strlen()
The strlen()
method returns the number of bytes in a given string.
Syntax
strlen(string);
The string
can either be a literal sequence of characters surrounded by quotes or a variable that refers to such a sequence.
Codebyte Example
The following example showcases the two ways of using the strlen()
method: