Menu

This is documentation for the next version of Alloy. For the latest stable release, go to the latest version.

Open source

trim

trim removes the specified set of characters from the start and end of a string.

alloy
trim(string, str_character_set)

Examples

alloy
> trim("?!hello?!", "!?")
"hello"

> trim("foobar", "far")
"oob"

> trim("   hello! world.!  ", "! ")
"hello! world."