[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 4/5] mllib: Hide unsafe lower/uppercase functions.



The ones in the OCaml stdlib assume ISO-8859-1 bytes and strings, and
so can end up corrupting UTF-8 strings.
---
 mllib/common_utils.mli | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli
index c0941f6..8083d8d 100644
--- a/mllib/common_utils.mli
+++ b/mllib/common_utils.mli
@@ -22,9 +22,7 @@ module Char : sig
     val code : char -> int
     val compare: t -> t -> int
     val escaped : char -> string
-    val lowercase : char -> char
     val unsafe_chr : int -> char
-    val uppercase : char -> char
 
     val lowercase_ascii : char -> char
     val uppercase_ascii : char -> char
@@ -34,7 +32,6 @@ end
 module String : sig
     type t = string
     val blit : string -> int -> string -> int -> int -> unit
-    val capitalize : string -> string
     val compare: t -> t -> int
     val concat : string -> string list -> string
     val contains : string -> char -> bool
@@ -48,19 +45,16 @@ module String : sig
     val index_from : string -> int -> char -> int
     val iter : (char -> unit) -> string -> unit
     val length : string -> int
-    val lowercase : string -> string
     val make : int -> char -> string
     val rcontains_from : string -> int -> char -> bool
     val rindex : string -> char -> int
     val rindex_from : string -> int -> char -> int
     val set : string -> int -> char -> unit
     val sub : string -> int -> int -> string
-    val uncapitalize : string -> string
     val unsafe_blit : string -> int -> string -> int -> int -> unit
     val unsafe_fill : string -> int -> int -> char -> unit
     val unsafe_get : string -> int -> char
     val unsafe_set : string -> int -> char -> unit
-    val uppercase : string -> string
 
     val lowercase_ascii : string -> string
     val uppercase_ascii : string -> string
-- 
2.5.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]