@technobuddha > library > String > Operations
Function: toEnumeration()
ts
function toEnumeration(input: string, ...tests: (
| string
| RegExp
| Iterable<
| string
| RegExp, any, any>)[]): undefined | number;Defined in: to-enumeration.ts:11
Convert a string to a numeric value
Parameters
| Parameter | Type | Description |
|---|---|---|
input | string | The string to convert |
...tests | ( | string | RegExp | Iterable< | string | RegExp, any, any>)[] | Array of tests (string value or regular expressions) |
Returns
undefined | number
The index of the first test to match the input string