Measuring strings

Edit on Github instead

Use Java's length() method to measure a string.

Called on: a string

Arguments: None

Returns: the length (number of characters) of the string.

String test = "testing";
test.length();                              // 7
String moreTesting = "testing with spaces!";
moreTesting.length();                       // 20

Suggest changes

Related links

URL Topic Source