Base (i.e., lower-level) string functions.
var string = require( '@stdlib/string/base' );
Namespace containing "base" (i.e., lower-level) string functions.
var ns = string;
// returns {...}
The namespace has the following sub-namespaces:
camelcase( str )
: convert a string to camel case.capitalize( str )
: capitalize the first character in a string.codePointAt( string, position, backward )
: return a Unicode code point from a string at a specified position.constantcase( str )
: convert a string to constant case.endsWith( str, search, len )
: test if a string ends with the characters of another string.formatInterpolate( tokens, ...args )
: generate string from a token array by interpolating values.formatTokenize( str )
: tokenize a string into an array of string parts and format identifier objects.kebabcase( str )
: convert a string to kebab case.lpad( str, len, pad )
: left pad a string.ltrim( str )
: trim whitespace characters from the beginning of a string.lowercase( str )
: convert a string to lowercase.pascalcase( str )
: convert a string to Pascal case.percentEncode( str )
: percent-encode a UTF-16 encoded string according to RFC 3986.repeat( str, n )
: repeat a string a specified number of times and return the concatenated result.replace( str, search, newval )
: replace search occurrences with a replacement string.rtrim( str )
: trim whitespace characters from the end of a string.snakecase( str )
: convert a string to snake case.startcase( str )
: capitalize the first letter of each word in a string.startsWith( str, search, position )
: test if a string starts with the characters of another string.trim( str )
: trim whitespace characters from the beginning and end of a string.uncapitalize( str )
: uncapitalize the first character of a string.uppercase( str )
: convert a string to uppercase.
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/string/base' );
console.log( objectKeys( ns ) );