# numGraphemeClusters
> Return the number of [grapheme clusters][unicode-text-segmentation] in a string.
## Usage
```javascript
var numGraphemeClusters = require( '@stdlib/string/num-grapheme-clusters' );
```
#### numGraphemeClusters( str )
Returns the number of [grapheme clusters][unicode-text-segmentation] in a `string`.
```javascript
var out = numGraphemeClusters( 'last man standing' );
// returns 17
out = numGraphemeClusters( 'Hidden Treasures' );
// returns 16
```
## Examples
```javascript
var numGraphemeClusters = require( '@stdlib/string/num-grapheme-clusters' );
var str = numGraphemeClusters( 'last man standing' );
// returns 17
str = numGraphemeClusters( '六书/六書' );
// returns 5
str = numGraphemeClusters( 'अनुच्छेद' );
// returns 5
str = numGraphemeClusters( '🌷' );
// returns 1
```
* * *
## CLI
### Usage
```text
Usage: num-grapheme-clusters [options] []
Options:
-h, --help Print this message.
-V, --version Print the package version.
-l, --lines Analyze individual lines.
```
### Examples
```bash
$ num-grapheme-clusters beep
4
```
To use as a [standard stream][standard-streams],
```bash
$ echo -n 'beep\nboop🌷' | num-grapheme-clusters
10
```
```bash
$ echo -n 'beep\nboop🌷' | num-grapheme-clusters -l
4
5
```
[unicode-text-segmentation]: http://www.unicode.org/reports/tr29/
[standard-streams]: https://en.wikipedia.org/wiki/Standard_streams
[@stdlib/string/next-grapheme-cluster-break]: https://github.com/stdlib-js/string/tree/main/next-grapheme-cluster-break