time-to-botec/squiggle/node_modules/@stdlib/string/prev-grapheme-cluster-break/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

32 lines
652 B
Plaintext

{{alias}}( str[, fromIndex] )
Returns the previous extended grapheme cluster break in a string before a
specified position.
Parameters
----------
str: string
Input string.
fromIndex: integer (optional)
Position. Default: str.length-1.
Returns
-------
out: integer
Previous extended grapheme cluster break position.
Examples
--------
> var out = {{alias}}( 'last man standing', 4 )
3
> out = {{alias}}( 'presidential election', 8 )
7
> out = {{alias}}( 'अनुच्छेद', 2 )
0
> out = {{alias}}( '🌷', 1 )
-1
See Also
--------