Siebel eScript Language Reference > Methods Reference > String Methods >

Get String Length Method


The Get String Length method returns an integer that describes the length of the string.

Format

stringVar.length

Example 1

The following example displays the number 14, which is the number of characters in the string. The position of the last character in the string is equivalent to the value in stringVar.length minus 1, because the position begins at 0, not at 1:

var string1 = "No, thank you.";
TheApplication().RaiseErrorText(string1.length);

Example 2

The following example returns the length of a name that the user enters, including spaces:

var userName = "Christopher J. Smith";
TheApplication().RaiseErrorText( "Your name has " +
   userName.length + " characters.");

Siebel eScript Language Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.