Files
highground-fork/string/docs/modify/trim.md

440 B

string_Trim

Trim whitespace from both sides of a string.

Arguments

  • str (string): the string to trim.

Returns

trimmed (string): the string with its whitespace removed.

Raises

  • AllocFail: raised if Ground failed to allocate memory for the new string.

Example

Ground

call !string_Trim "   aaabbb  " &trimmed
println $trimmed # "aaabbb"

Solstice

puts string_Trim("   aaabbb  ") // "aaabbb"