time-to-botec/squiggle/node_modules/@stdlib/string/truncate/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

31 lines
513 B
Plaintext

{{alias}}( str, len[, ending] )
Truncates a string to a specified length.
Parameters
----------
str: string
Input string.
len: integer
Output string length.
ending: string (optional)
Custom ending. Default: '...'.
Returns
-------
out: string
Truncated string.
Examples
--------
> var str = 'beep boop';
> var out = {{alias}}( str, 5 )
'be...'
> out = {{alias}}( str, 5, '|' )
'beep|'
See Also
--------