@technobuddha > library > String > Analysis
Function: syllables()
ts
function syllables(input: string): number;Defined in: syllables.ts:17
Approximate the number of syllables in a string
Parameters
| Parameter | Type | Description |
|---|---|---|
input | string | The string |
Returns
number
the number of syllables
Example
typescript
syllables('hello'); // 2
syllables('syllable'); // 3