-- Convert upper case letter to lower case.
toLower: Upper +> Lower
toLower(c) == LOWERS(Seq`indexOf[Upper](c,UPPERS)) post toUpper(RESULT) = c;
-- Convert lower case letter to upper case.
toUpper: Lower +> Upper
toUpper(c) == UPPERS(Seq`indexOf[Lower](c,LOWERS)); --post toLower(RESULT) = c;
-- Is a character a decimal digit?
isDigit: char +> bool
isDigit(c) == c inset DIGIT;
-- Are all characters in a sequence decimal digits?
isDigits: seqofchar +> bool
isDigits(sc) == forall c insetelems sc & isDigit(c);
-- Is a character white space?
isWhiteSpace: char +> bool
isWhiteSpace(c) == c inset WHITE_SPACE;
-- Are all characters in a sequence white space?
isWhiteSpaces: seqofchar +> bool
isWhiteSpaces(sc) == forall c insetelems sc & isWhiteSpace(c);
-- Trim white space from the front and back of a string.
trimWhite: seqofchar +> seqofchar
trimWhite(s) == Seq`dropWhile[char](isWhiteSpace, reverse(Seq`dropWhile[char](isWhiteSpace, reverse(s))));
-- Filter white space from a string.
filterWhite: seqofchar +> seqofchar
filterWhite(s) == [ c | c inseq s & not isWhiteSpace(c) ];
endChar
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤