@technobuddha > library > String > Deconstruction
Function: root()
ts
function root(text: string, options: RootOptions): string;Defined in: root.ts:21
Extract the root word, removing a prefix and/or suffix
Parameters
| Parameter | Type | Description |
|---|---|---|
text | string | The word, which might have |
options | RootOptions | see RootOptions |
Returns
string
The root word
See
- prefix before it, and
- suffix after it.