Definitions for String #
This file defines a bunch of functions for the String datatype.
Pad s : String with repeated occurrences of c : Char until it's of length n.
If s is initially larger than n, just return s.
Instances For
Construct the string consisting of n copies of the character c.
Instances For
Pad s : String with repeated occurrences of c : Char on the right until it's of length n.
If s is initially larger than n, just return s.
Instances For
s.IsPrefix t checks if the string s is a prefix of the string t.
Instances For
s.IsSuffix t checks if the string s is a suffix of the string t.
Instances For
String.mapTokens c f s tokenizes s : string on c : char, maps f over each token, and
then reassembles the string by intercalating the separator token c over the mapped tokens.
Instances For
Produce the head character from the string s, if s is not empty, otherwise 'A'.