more sanitizers (for lowercase idents)

parent 2cbd45e9
......@@ -193,9 +193,15 @@ let char_to_ualpha c = String.capitalize (char_to_alpha c)
let char_to_alnum c =
match c with '0'..'9' -> String.make 1 c | _ -> char_to_alpha c
let char_to_lalnum c =
match c with '0'..'9' -> String.make 1 c | _ -> char_to_lalpha c
let char_to_alnumus c =
match c with '_' | ' ' -> "_" | _ -> char_to_alnum c
let char_to_lalnumus c =
match c with '_' | ' ' -> "_" | _ -> char_to_lalnum c
let sanitizer head rest n =
let lst = ref [] in
let code c = lst := rest c :: !lst in
......
......@@ -103,5 +103,7 @@ val char_to_alpha : char -> string
val char_to_lalpha : char -> string
val char_to_ualpha : char -> string
val char_to_alnum : char -> string
val char_to_lalnum : char -> string
val char_to_alnumus : char -> string
val char_to_lalnumus : char -> string
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment