.length / .uppercase()
Try it yourself →Length and case conversion.
Syntax
s.length s.uppercase() s.lowercase()
Description
length gives the number of characters (it's a property, not a method). uppercase/lowercase convert casing.
Example
val s = "HexLibrary" println(s.length) println(s.uppercase()) println(s.lowercase())
Expected output
10 HEXLIBRARY hexlibrary
When to use?
Input validation, text normalization.