Learn Haxe

An easier way to learn how to use the Haxe core and related technologies.

Trim, Replace, and More Haxe String Extensions

Tagged with: Haxe

Haxe includes convenient string-modification methods like trim and replace. They don't exist on the String class by default, but need to be included via the StringTools extension:

import StringTools;

Like C#, this is a static extension (syntactic sugar); you can find the full list of extension methods on the StringTools API page.

You can learn more about static extensions via the Static Extensions documentation page.