[Home] Module Microsoft.FSharp.Compatibility.String


Compatibility module for string processing. Richer string operations are available via the member functions on strings and other functionality in the System.String type and the System.Text.RegularExpressions namespace.

Values

ValueDescription
val capitalize : string -> string
Return a string with the first character converted to uppercase.
[<OCamlCompatibilityAttribute ("Consider using 'Operators.compare' instead")>]
val compare : string -> string -> int
Compare the given strings using ordinal comparison
[<OCamlCompatibilityAttribute ("Consider using 'str.Contains' instead")>]
val contains : string -> char -> bool
Return true is the given string contains the given character
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
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
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
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.
[<OCamlCompatibilityAttribute ("Consider using 'str.[i]' instead")>]
val get : string -> int -> char
Returns the character at the specified position in the string
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
val index : string -> char -> int
Return the first index of the given character in the string. Raise KeyNotFoundException if the string does not contain the given character.
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
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 KeyNotFoundException if the string does not contain the given character.
[<OCamlCompatibilityAttribute ("Consider using 'str.ToLower()' instead")>]
val lowercase : string -> string
Return a new string with all characters converted to lowercase
[<OCamlCompatibilityAttribute ("Consider using 'String.replicate' instead")>]
val make : int -> char -> string
Return a string of the given length containing repetitions of the given character
[<OCamlCompatibilityAttribute
  ("Consider using the overloaded 'string' operator instead")>]
val of_char : char -> string
Return s string of length 1 containing the given character
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
val rcontains_from : string -> int -> char -> bool
Return true if the string contains the given character prior to the given index
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
val rindex : string -> char -> int
Return the index of the first occurrence of the given character from the end of the string proceeding backwards
[<OCamlCompatibilityAttribute ("Consider using 'str.IndexOf' instead")>]
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.
[<OCamlCompatibilityAttribute ("Consider using 'str.[i]' instead")>]
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.
[<OCamlCompatibilityAttribute ("Consider using 'str.ToUpper' instead")>]
val uppercase : string -> string
Return a string with all characters converted to uppercase.

See Also

Microsoft.FSharp.Compatibility


Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16