.length() / .toUpperCase()
Length and case conversion.
Syntax
s.length() s.toUpperCase() s.toLowerCase()
Description
length() returns the character count. toUpperCase/toLowerCase convert casing (returns a new string). Concatenation is done with + or interpolation.
Example
Loading editor…
Expected output
10 HEXLIBRARY hexlibrary
When to use?
Input validation, case-insensitive comparison.