@stdlib/string
Version:
String manipulation functions.
30 lines (24 loc) β’ 627 B
Plain Text
{{alias}}( str, start, end )
Slices a string based on Unicode code point indices.
Parameters
----------
str: string
Input string.
start: integer
The `ith` Unicode code point to start a slice (inclusive).
end: integer
The `jth` Unicode code point to end a slice (exclusive).
Returns
-------
out: string
Output string.
Examples
--------
> var out = {{alias}}( 'Hello π World', 1, 3 )
'el'
> out = {{alias}}( 'πππ', 1, 2 )
'π'
> out = {{alias}}( 'ε
δΉ¦/ε
ζΈ', 1, 14 )
'δΉ¦/ε
ζΈ'
See Also
--------