Subscribed unsubscribe Subscribe Subscribe

Str_length()

processing_Sample

str.length()
String::length() \ Language (API) \ Processing 2+

returns the total number of characters included
in the String as an intger number

String str1 = "Hoge";
String str2 = "HogeHoge";

int s1 = str1.length();
int s2 = str2.length();

print(s1+ ":" +s2); // prints