a port of the Processing Visualization Language
Class String
Name

length()

Examples
String str1 = "CCCP";
String str2 = "Rabbit";
int l1 = str1.length();
int l2 = str2.length();
println(l1 + ":" + l2);  // Prints '4:6'
Description

Returns the total number of characters included in the String as an integer number.

People are often confused by the use of length() to get the size of a String and length to get the size of an array. Notice the absence of the parentheses when working with arrays.

Syntax
str.charAt()
Parameters
str String: any variable of type String
Returns int
Usage Web & Application

This reference is licensed under the CC BY-NC-SA 2.0 license:

Creative Commons License
Fork me on GitHub