-- |Tansforms random (that is, random per input String) Chars of a String into uppercase.
mockRandom::T.Text->T.Text
-- | Transforms characters of a string into uppercase where the corresponding element of the bool list is true. On encountering a letter that already is uppercase the mask is reversed.
-- | Transforms a character into a unicode sub- or superscript variant. If true is given and a subscript version is available, that is used. If none is available or false is given, a superscript version is used. If none is available, the character is left unchanged.
toSubSuper::Bool->Char->Char
toSubSupersubc=case(sub,c)of
toSubSuper=curry$\case
(_,'A')->chr7468
(_,'B')->chr7470
(_,'D')->chr7472
@@ -135,23 +162,7 @@ toSubSuper sub c = case (sub, c) of
(_,'z')->'ᶻ'
(_,c)->c
-- |Transforms double-struck characters back into their normal variant.
fromDouble::Char->Char
fromDoublec=caseordcof
8450->'C'
8461->'H'
8469->'N'
8473->'P'
8474->'Q'
8477->'R'
8484->'Z'
code
|120792<=code&&code<=120801->chr$code-120792+48
|120120<=code&&code<=120145->chr$code-120120+65
|120146<=code&&code<=120171->chr$code-120146+97
code->chrcode
-- |Transforms lowercase characters into their unicode small capital variant
-- | Transforms lowercase characters into their unicode small capital variants.
toSmallCap::Char->Char
toSmallCap=\case
'a'->chr7424
@@ -181,6 +192,7 @@ toSmallCap = \case
'z'->chr7458
c->c
-- | Replaces some characters with cyrillic ones *looking* similarly.
toCyrillic::Char->Char
toCyrillic=\case
'A'->'Д'
@@ -205,19 +217,19 @@ toCyrillic = \case
'y'->'џ'
c->c
-- |Replaces all occurences of lowercase "ck" and "k" in a string with "cc"s.
mockCC::T.Text->T.Text
-- |Replaces all occurences of *lowercase* "g", "ck" and "k" in a string with "cc".
mockCC::Text->Text
mockCC=T.replace"k""cc".T.replace"ck""cc"
-- |Repaclaces all occurences of "b" and "B" with B button emojis.
-- |Replaces all occurences of "b", "B", "p" and "P" with B button emojis.
mockB::Text->Text
mockB=T.replace"b""🅱️".T.replace"B""🅱️"
-- |Makes a square from a string.
-- |Makes a square of a string by putting it with spaces in the first line and then all characters except the first in single lines after that first line.