/
strLength
strLength
Description
Returns the length of string, which is the number of ASCII characters (not to be confused with the character module in Shogun Post) contained within the string.
Functional area
String
Command syntax
Syntax
strLength "string" |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
string | string | yes | String to get the length of. |
Flags
None
Return value
integer
Returns the number of characters in the string.
Examples
// Get the length of a string string $str = "This is some text"; int $length; // Length of str $length = `strLength $str`; print $length; // Should be 17 // Length of an empty string $length = `strLength ""`; print $length; // Should be 0
Additional information
Related commands
, multiple selections available,