X-Git-Url: http://git.hcoop.net/hcoop/zz_old/portal.git/blobdiff_plain/65ba123db91b9174c4bb271bdc73ed57a7d4abf8..efce969f2f5ccb01509bb7d5a8d6fbae29ecf6ce:/util.sml?ds=sidebyside diff --git a/util.sml b/util.sml index d1c7214..f1bdcbb 100644 --- a/util.sml +++ b/util.sml @@ -81,4 +81,10 @@ fun readFile fname = fun mem (x, ls) = List.exists (fn y => y = x) ls +val allLower = CharVector.map Char.toLower + +fun normEmail s = case String.tokens Char.isSpace (allLower s) of + s :: _ => s + | [] => "" + end