# hasUTF16SurrogatePairAt > Test if a position in a string marks the start of a [UTF-16][utf-16] surrogate pair.
## Usage ```javascript var hasUTF16SurrogatePairAt = require( '@stdlib/assert/has-utf16-surrogate-pair-at' ); ``` #### hasUTF16SurrogatePairAt( string, position ) Tests if a `position` (in [UTF-16][utf-16] code units) in a `string` marks the start of a [UTF-16][utf-16] surrogate pair. ```javascript var bool = hasUTF16SurrogatePairAt( '🌷', 0 ); // returns true bool = hasUTF16SurrogatePairAt( '🌷', 1 ); // returns false ```
## Notes - Note that `position` does **not** refer to a visual character position, but to an index in the ordered sequence of [UTF-16][utf-16] code units.
## Examples ```javascript var hasUTF16SurrogatePairAt = require( '@stdlib/assert/has-utf16-surrogate-pair-at' ); var bool = hasUTF16SurrogatePairAt( '🌷', 0 ); // returns true bool = hasUTF16SurrogatePairAt( '🌷', 1 ); // returns false ```
* * *
## CLI
### Usage ```text Usage: has-utf16-surrogate-pair-at [options] [] --pos= Options: -h, --help Print this message. -V, --version Print the package version. --pos index Position in string. ```
### Examples ```bash $ has-utf16-surrogate-pair-at --pos=0 🌷 true ``` To use as a [standard stream][standard-streams], ```bash $ echo -n '🌷' | has-utf16-surrogate-pair-at --pos=1 false ```