String Class

length()

String::length, length, String.length

Returns the length of the String, in characters. (Note that this doesn't include a trailing null character.)

// SYNTAX
string.length()

Parameters:

  • string: a variable of type String

Returns: The length of the String in characters.