API Reference › Text › Text.trim
method

Text.trim

Text.trim(s) -> string

Returns a fresh string with leading and trailing whitespace (spaces, tabs, newlines, carriage returns) removed; inner spacing is kept. Use it to clean up typed input or a parsed field before comparing or storing it.

Example

program Demo {
  handler Step phase Update {
    let name = Text.trim(raw_input)
  }
}
← All symbols