String.length()

Signature

int length (String s1)

Domain

action, condition

Description

Returns the length (number of characters) of the String passed in.

Parameters

NameTypeDescription
s1StringA String to find the length of.

Returns

TypeDescription
intThe length of the String passed in.

Cautions

none

Example


int result = String.length ("This is a test");

Result is:
result contains: 14