system.string

The system.string module provides string manipulation functions.

Import

import system.string as str;

⚠️ Note Always use an alias when importing system.string since string is a reserved keyword.

Functions

Case Conversion

Search & Test

Modification

Example

import system.string as str;
import system.io as io;

let s = "  Hello, World!  ";
io.out.println(str.trim(s));           // "Hello, World!"
io.out.println(str.uppercase(s));      // "  HELLO, WORLD!  "
io.out.println(str.length(str.trim(s)));  // 13

See the full API reference for more details.