summaryrefslogtreecommitdiffstats
path: root/stdlib/bytes.ml
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2014-12-21 11:46:18 +0000
committerGabriel Scherer <gabriel.scherer@gmail.com>2014-12-21 11:46:18 +0000
commitbcaa58a035c4dd7163a503d30f83efb45fa4662c (patch)
tree28982623440e7e996a4a409ee44da78f3e3f0022 /stdlib/bytes.ml
parentc7f2f72c07e34e0e28836ae3c0f8f9c7a12128eb (diff)
PR6694: Deprecate Latin-1 string manipulation functions.
Also, add documentation for the US-ASCII variants. From: Peter Zotov <whitequark@whitequark.org> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15729 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/bytes.ml')
-rw-r--r--stdlib/bytes.ml14
1 files changed, 8 insertions, 6 deletions
diff --git a/stdlib/bytes.ml b/stdlib/bytes.ml
index b3e7679a6..193c3ceea 100644
--- a/stdlib/bytes.ml
+++ b/stdlib/bytes.ml
@@ -203,9 +203,6 @@ let mapi f s =
r
end
-let uppercase s = map Char.uppercase s
-let lowercase s = map Char.lowercase s
-
let uppercase_ascii s = map Char.uppercase_ascii s
let lowercase_ascii s = map Char.lowercase_ascii s
@@ -216,9 +213,6 @@ let apply1 f s =
r
end
-let capitalize s = apply1 Char.uppercase s
-let uncapitalize s = apply1 Char.lowercase s
-
let capitalize_ascii s = apply1 Char.uppercase_ascii s
let uncapitalize_ascii s = apply1 Char.lowercase_ascii s
@@ -267,3 +261,11 @@ type t = bytes
let compare (x: t) (y: t) = Pervasives.compare x y
external equal : t -> t -> bool = "caml_string_equal"
+
+(* Deprecated functions implemented via other deprecated functions *)
+[@@@ocaml.warning "-3"]
+let uppercase s = map Char.uppercase s
+let lowercase s = map Char.lowercase s
+
+let capitalize s = apply1 Char.uppercase s
+let uncapitalize s = apply1 Char.lowercase s