time-to-botec/squiggle/node_modules/@stdlib/assert/has-utf16-surrogate-pair-at/docs/repl.txt

28 lines
479 B
Plaintext
Raw Normal View History

{{alias}}( str, pos )
Tests if a position in a string marks the start of a UTF-16 surrogate pair.
Parameters
----------
str: string
Input string.
pos: integer
Position.
Returns
-------
bool: boolean
Boolean indicating whether surrogate pair exists at specified position.
Examples
--------
> var out = {{alias}}( '🌷', 0 )
true
> out = {{alias}}( '🌷', 1 )
false
See Also
--------