@str.len
Return the length of a string.
Returns: number
Syntax
Section titled “Syntax”@str.len(value)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
value |
string |
Input value |
Examples
Section titled “Examples”# Get string lengthset $s "hello"print @str.len($s)
# Empty string lengthprint @str.len("")See Also
Section titled “See Also”- @str.slice — extract a substring
- @len — array length