String Length
The string::length function returns the number of characters in a given string.
Syntax
string::length(<string>)Parameters
string: The input string whose length is to be calculated.
Returns
- Number: The total number of characters in the string.
Example
string::length("hello")This function is useful for determining the size of a string for validation or formatting purposes.