Version française
Home     About     Download     Resources     Contact us    
Browse thread
String.map ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe Raffalli <Christophe.Raffalli@u...>
Subject: String.map ?

Why the function String.map (present in string.ml) is not exported in 
string.mli ?

It is usefull ! example (sorry for the height bits chars) :

let transform_char = function
    '!' -> ' '
  | 'é' -> 'e'
  | 'è' -> 'e'
  | 'ê' -> 'e'
  | 'ë' -> 'e'
  | 'à' -> 'a'
  | 'ä' -> 'a'
  | 'ù' -> 'u'
  | 'ü' -> 'u'
  | 'î' -> 'i'
  | 'ï' -> 'i'
  | 'ö' -> 'o'
  | c -> c

let transform_string = 
  String.map transform_char 


-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI