Preparing search index...
The search index is not available
ts-roids
ts-roids
Strlen
Type alias Strlen<S, Arr>
Strlen
<
S
,
Arr
>
:
S
extends
`
${
infer
L
}
${
infer
R
}
`
?
Strlen
<
R
,
[
...
Arr
,
L
]
>
:
Arr
[
"length"
]
Get the length of a given string type S
Type Parameters
S
extends
string
Arr
extends
any
[]
=
EmptyArray
Example
Strlen
<
'foo'
>;
// Result: 3
Copy
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
ts-roids
Loading...
Get the length of a given string type S