2.9 KiB
2.9 KiB
uppercase
Convert a string to uppercase.
Usage
var uppercase = require( '@stdlib/string/uppercase' );
uppercase( str )
Converts a string
to uppercase.
var str = uppercase( 'bEEp' );
// returns 'BEEP'
Examples
var uppercase = require( '@stdlib/string/uppercase' );
var str;
str = uppercase( 'Beep' );
// returns 'BEEP'
str = uppercase( 'BeEp' );
// returns 'BEEP'
str = uppercase( 'Beep BOOP' );
// returns 'BEEP BOOP'
str = uppercase( '$**_beep_BoOp_**$' );
// returns '$**_BEEP_BOOP_**$'
str = uppercase( '' );
// returns ''
CLI
Usage
Usage: uppercase [options] [<string>]
Options:
-h, --help Print this message.
-V, --version Print the package version.
Examples
$ uppercase bEEp
BEEP
To use as a standard stream,
$ echo -n 'bEEp' | uppercase
BEEP
See Also
@stdlib/string/capitalize
: capitalize the first character in a string.@stdlib/string/lowercase
: convert a string to lowercase.