@stdlib/string-remove-first

Remove the first character of a string.

Usage no npm install needed!

<script type="module">
  import stdlibStringRemoveFirst from 'https://cdn.skypack.dev/@stdlib/string-remove-first';
</script>

README

removeFirst

NPM version Build Status Coverage Status dependencies

Remove the first character of a string.

Installation

npm install @stdlib/string-remove-first

Usage

var removeFirst = require( '@stdlib/string-remove-first' );

removeFirst( str )

Removes the first character of a string.

var out = removeFirst( 'last man standing' );
// returns 'ast man standing'

out = removeFirst( 'Hidden Treasures' );
// returns 'idden Treasures'

Examples

var removeFirst = require( '@stdlib/string-remove-first' );

var str = removeFirst( 'last man standing' );
// returns 'ast man standing'

str = removeFirst( 'presidential election' );
// returns 'residential election'

str = removeFirst( 'javaScript' );
// returns 'avaScript'

str = removeFirst( 'Hidden Treasures' );
// returns 'idden Treasures'

CLI

Installation

To use the module as a general utility, install the module globally

npm install -g @stdlib/string-remove-first

Usage

Usage: remove-first [options] [<string>]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.

Examples

$ remove-first beep
eep

To use as a standard stream,

$ echo -n 'beep' | remove-first
eep

Notice

This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.

For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.

Community

Chat


License

See LICENSE.

Copyright

Copyright © 2016-2021. The Stdlib Authors.