int_of_char ?

Giuseppe Castagna Giuseppe.Castagna at
Sun Dec 31 19:18:12 CET 2006

We have char_of_int in CDuce but how to have the inverse function? What is the 
interest of it? I want to uncapitalize a string s just by doing

   map s with
     x & ('A'--'Z') -> char_of_int(int_of_char(x)+32)
   | x -> x;;

Rather than the more tedious

   map s with
     'A' -> 'a'
    |'B' -> 'b'
    |'C' -> 'c'

etc ...

Any suggestion?


More information about the Cduce-users mailing list