time-to-botec/js/node_modules/@stdlib/string/right-trim-n/docs/repl.txt

29 lines
543 B
Plaintext
Raw Normal View History

{{alias}}( str, n[, chars] )
Trims `n` characters from the end of a string.
Parameters
----------
str: string
Input string.
n: integer
Number of characters to trim.
chars: Array<string>|string (optional)
Characters to trim. Default: whitespace characters.
Returns
-------
out: string
Trimmed string.
Examples
--------
> var out = {{alias}}( ' abc ', 2 )
' abc'
> var out = {{alias}}( '!!!abc!!!', 2, '!' )
'!!!abc!'
See Also
--------