Siebel eScript Language Reference > Siebel eScript Commands > String Objects >
The length property stores an integer indicating the length of the string.
The length of a string can be obtained by using the length property. For example:
var string1 = "No, thank you.";
displays the number 14, the number of characters in the string. Note that the index of the last character in the string is equivalent to
.length -1, because the index begins at 0, not at 1.
This code fragment returns the length of a name entered by the user (including spaces).
var userName = "Christopher J. Smith";
TheApplication().RaiseErrorText( "Your name has " +
userName.length + " characters.");