diff options
author | Gabriel Scherer <gabriel.scherer@gmail.com> | 2014-12-21 11:46:18 +0000 |
---|---|---|
committer | Gabriel Scherer <gabriel.scherer@gmail.com> | 2014-12-21 11:46:18 +0000 |
commit | bcaa58a035c4dd7163a503d30f83efb45fa4662c (patch) | |
tree | 28982623440e7e996a4a409ee44da78f3e3f0022 /stdlib/string.mli | |
parent | c7f2f72c07e34e0e28836ae3c0f8f9c7a12128eb (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/string.mli')
-rw-r--r-- | stdlib/string.mli | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/stdlib/string.mli b/stdlib/string.mli index 1f6191512..3a0af298f 100644 --- a/stdlib/string.mli +++ b/stdlib/string.mli @@ -215,20 +215,46 @@ val rcontains_from : string -> int -> char -> bool position in [s]. *) val uppercase : string -> string + [@@ocaml.deprecated "Use String.uppercase_ascii instead."] (** Return a copy of the argument, with all lowercase letters translated to uppercase, including accented letters of the ISO - Latin-1 (8859-1) character set. *) + Latin-1 (8859-1) character set. + @deprecated Functions operating on Latin-1 character set are deprecated. *) val lowercase : string -> string + [@@ocaml.deprecated "Use String.lowercase_ascii instead."] (** Return a copy of the argument, with all uppercase letters translated to lowercase, including accented letters of the ISO - Latin-1 (8859-1) character set. *) + Latin-1 (8859-1) character set. + @deprecated Functions operating on Latin-1 character set are deprecated. *) val capitalize : string -> string -(** Return a copy of the argument, with the first character set to uppercase. *) + [@@ocaml.deprecated "Use String.capitalize_ascii instead."] +(** Return a copy of the argument, with the first character set to uppercase, + using the ISO Latin-1 (8859-1) character set.. + @deprecated Functions operating on Latin-1 character set are deprecated. *) val uncapitalize : string -> string -(** Return a copy of the argument, with the first character set to lowercase. *) + [@@ocaml.deprecated "Use String.uncapitalize_ascii instead."] +(** Return a copy of the argument, with the first character set to lowercase, + using the ISO Latin-1 (8859-1) character set.. + @deprecated Functions operating on Latin-1 character set are deprecated. *) + +val uppercase_ascii : string -> string +(** Return a copy of the argument, with all lowercase letters + translated to uppercase, using the US-ASCII character set. *) + +val lowercase_ascii : string -> string +(** Return a copy of the argument, with all uppercase letters + translated to lowercase, using the US-ASCII character set. *) + +val capitalize_ascii : string -> string +(** Return a copy of the argument, with the first character set to uppercase, + using the US-ASCII character set. *) + +val uncapitalize_ascii : string -> string +(** Return a copy of the argument, with the first character set to lowercase, + using the US-ASCII character set. *) type t = string (** An alias for the type of strings. *) @@ -245,11 +271,6 @@ val equal: t -> t -> bool (**/**) -val lowercase_ascii : string -> string -val uppercase_ascii : string -> string -val capitalize_ascii : string -> string -val uncapitalize_ascii : string -> string - (* The following is for system use only. Do not call directly. *) external unsafe_get : string -> int -> char = "%string_unsafe_get" |