Strings module
This module contains string processing functions.
Functions
- String base64Decode(String str) - Base64 decode a string
- String base64Encode(String str) - Base64 encode a string
- Void behead(String x) - Remove the first character of a string, in-place.
- Bool elem(Char c,String str) - Check if a character appears in a string
- [String] fields(String input,[Char] delimiters,[Char] escape) - Split a string into fields
- String filter(Bool(Char) p,String str) - Filter a string according to a predicate.
- Int firstOccurs(Char c,String str) - Return the position of the first occurence of a character
- Int firstOccurs(String needle,String haystack) - Return the position of the first occurence of a substring
- Char head(String s) - Get the first character in a String
- String join([String] xs,Char c='\n') - Join a list of words into a String with the specified separator
- String join([String] xs,String s) - Join a list of words into a String with the specified separator
- [String] lines(String x) - Splits a string into lines
- Void ltrim(var String x,Bool(Char) fn=isSpace) - Trim selected characters from the start of a String
- Void ltruncate(Int i,String x) - Remove characters from the left of a string, in-place.
- Void rtrim(var String x,Bool(Char) fn=isSpace) - Trim selected characters from the end of a String
- Void rtruncate(Int i,String x) - Remove characters from the right of a string, in-place.
- String tail(String str) - Get the first character in a String
- Void trim(var String x,Bool(Char) fn=isSpace) - Trim selected characters from both ends of a String
- String unwords([String] xs) - Join a list of words into a String.
- [String] words(String x) - Split a String into words.