Value | Description |
val capitalize : string -> string |
Return a string with the first character converted to uppercase.
|
val compare : string -> string -> int |
Compare the given strings using ordinal comparison
|
val concat : string -> string list -> string |
Return a new string made by concatenating the given strings
with separator 'sep', i.e. 'a1 + sep + ... + sep + aN'
|
val contains : string -> char -> bool |
Return true is the given string contains the given character
|
val contains_between : string -> int -> int -> char -> bool |
Return true is the given string contains the given character in the
range specified by the given start index and the given length
|
val contains_from : string -> int -> char -> bool |
Return true is the given string contains the given character in the
range from the given start index to the end of the string.
|
val exists : (char -> bool) -> string -> bool |
Test if any character of the string satisfies the given predicate.
|
val for_all : (char -> bool) -> string -> bool |
Test if all characters in the string satisfy the given predicate.
|
val get : string -> int -> char |
Returns the character at the specified position in the string
|
val index : string -> char -> int |
Return the first index of the given character in the
string. Raise [[Not_found]]/[[KeyNotFoundException]] if
the string does not contain the given character.
|
val index_from : string -> int -> char -> int |
Return the first index of the given character in the
range from the given start position to the end of the string.
Raise [[Not_found]]/[[KeyNotFoundException]] if
the string does not contain the given character.
|
val iter : (char -> unit) -> string -> unit |
Apply the given function to each character in the string
|
val length : string -> int |
Return the length of the string.
|
val lowercase : string -> string |
Return a new string with all characters converted to lowercase
|
val make : int -> char -> string |
Return a string of the given length containing repetitions of the given character
|
val map : (char -> char) -> string -> string |
Build a new string whose characters are the results of applying the given function
to each of the characters of the input string.
|
val map_concat : (char -> string) -> string -> string |
Build a new string whose characters are the results of applying the given function
to each of the characters of the input string and concatenating the resulting
strings.
|
val of_char : char -> string |
Return s string of length 1 contianing the given character
|
val rcontains_from : string -> int -> char -> bool |
Return true if the string contains the given character prior to the given index
|
val rindex : string -> char -> int |
Return the index of the first occurrence of the given character
from the end of the string proceeding backwards
|
val rindex_from : string -> int -> char -> int |
Return the index of the first occurrence of the given character
starting from the given index proceeding backwards.
|
val split : char list -> (string -> string list) |
Split the string using the given list of separator characters.
Trimming is also performed at both ends of the string and any empty
strings that result from the split are discarded.
|
val sub : string -> int -> int -> string |
Return a substring of length 'length' starting index 'start'.
|
val trim : char list -> (string -> string) |
Removes all occurrences of a set of characters specified in a
list from the beginning and end of this instance.
|
val uncapitalize : string -> string |
Return a string with the first character converted to lowercase.
|
val uppercase : string -> string |
Return a string with all characters converted to uppercase.
|