next up previous contents
Next: Methods Up: Properties Previous: Properties   Contents


length

Description
The length property contains an integer that indicates the number of characters in the String object. The last character in the String object has an index of length-1.


Syntax

  1. StringObj.length
  2. "String Literal".length


Example

s = new String("Hello World");
s.length; //returns 11




Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.