.length / .toUpperCase
Try it yourself →Length and case conversion.
Syntax
s.length s.toUpperCase s.toLowerCase
Description
length gives the number of characters. toUpperCase/toLowerCase convert cases (returns new text).
Example
val s = "HexLibrary" println(s.length) println(s.toUpperCase) println(s.toLowerCase)
Expected output
10 HEXLIBRARY hexlibrary
When to use?
Input validation, text normalization.