time-to-botec/squiggle/node_modules/@stdlib/string/truncate-middle/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
535 B
Plaintext

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