Get the length of a string in characters.
int strlen <string:str>
Name | Type | Comment |
---|---|---|
str | string | A string, the length of which is to be determined. |
An integer containing the length of str, in characters.
// create a new integer int i // set integer value to be length of a string using strlen set i <zs:strlen "This text is 31 characters long"> // echo result to event log echo i
… the output of which is written to the event log by echo as:
31
None.