Osiris.StringExtra
val count : (char -> bool) -> string -> int
count p s returns the number of characters c in the string s such that p c is true.
count p s
c
s
p c
val double : (char -> bool) -> string -> string
double p s is a copy of the string s where every character c such that p c is true has been doubled (that is, repeated twice in succession).
double p s