String Functions

Some useful functions dealing with string manipulation.

string list string_split(s : string, sep : string) split the string s using separator sep string sprintf(fmt : string, params : (any | array)) Format a string. If only one parameter is needed then it can be directly passed, either the parameters need to be stored in an array. The following formats are accepted (with corresponding types) :
  • %s : string
  • %d %x %X : int
  • %c : int in the 0..255 range
  • %b : bool
  • %f : float
string url_decode(string) Decode an url using escaped format string url_encode(string) Encode an url using escaped format string base_encode(s : string, base : string) Encode a string using the specified base. The base length must be a power of two. string base_decode(s : string, base : string) Decode a string encode in the specified base. The base length must be a power of two.

© 2019 Haxe Foundation | Contribute to this page