Additional operations on String
Function or value | Description | ||
Full Usage:
String.contains char source
Parameters:
char
source : string
Returns: bool
|
|
||
Full Usage:
String.drop count source
Parameters:
int
source : string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() Returns a string that drops first N characters of the original string. When count exceeds the length of the string it returns an empty string.
|
||
Full Usage:
String.endsWith subString source
Parameters:
string
source : string
Returns: bool
|
![]() ![]() ![]() ![]() ![]() ![]() Does the source string end with the given subString? -- function wrapper for String.EndsWith method using InvariantCulture.
|
||
Full Usage:
String.findIndex predicate source
Parameters:
char -> bool
source : string
Returns: int
|
![]() ![]() ![]() ![]() ![]() ![]() Finds the first index of the char in the substring which satisfies the given predicate. Note: throws an ArgumentException when not found.
|
||
Full Usage:
String.findSliceIndex slice source
Parameters:
string
source : string
Returns: int
The index of the slice.
|
|
||
Full Usage:
String.getBytes encoding source
Parameters:
Encoding
source : string
Returns: byte[]
|
|
||
Full Usage:
String.intercalate separator source
Parameters:
string
source : seq<string>
Returns: string
|
|
||
Full Usage:
String.intersperse element source
Parameters:
char
source : string
Returns: string
|
|
||
Full Usage:
String.isSubString subString source
Parameters:
string
source : string
Returns: bool
|
|
||
Full Usage:
String.item index source
Parameters:
int
source : string
Returns: char
|
![]() ![]() ![]() ![]() ![]() ![]() (Unsafely) Returns the char at the given index in the source string. This is a function wrapper for `source.[index]` method. Note: this is not exception safe, and will throw System.IndexOutOfRangeException when the given index is out of bounds.
|
||
Full Usage:
String.normalize normalizationForm source
Parameters:
NormalizationForm
source : string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() Returns a new string whose textual value is the same as this string, but whose binary representation is in the specified Unicode normalization form. This is a null safe function wrapper of the String.Normalize method.
|
||
|
|
||
Full Usage:
String.ofCodePoints source
Parameters:
seq<int>
Returns: string
|
|
||
|
|
||
Full Usage:
String.ofSeq source
Parameters:
seq<char>
Returns: string
|
|
||
Full Usage:
String.padLeft totalLength source
Parameters:
int
source : string
Returns: string
|
|
||
Full Usage:
String.padLeftWith totalLength paddingChar source
Parameters:
int
paddingChar : char
source : string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() Pads the beginning of the given string with a specified character so that it has a specified total length.
|
||
Full Usage:
String.padRight totalLength source
Parameters:
int
source : string
Returns: string
|
|
||
Full Usage:
String.padRightWith totalLength paddingChar source
Parameters:
int
paddingChar : char
source : string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() Pads the end of the given string with a specified character so that it has a specified total length.
|
||
Full Usage:
String.removeDiacritics source
Parameters:
string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() Removes diacritics (accents) from the given source string. The approach uses `normalize` to split the input string into constituent glyphs (basically separating the "base" characters from the diacritics) and then scans the result and retains only the base characters.
|
||
Full Usage:
String.replace oldValue newValue source
Parameters:
string
newValue : string
source : string
Returns: string
|
|
||
|
|
||
Full Usage:
String.skip count source
Parameters:
int
source : string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() (Unsafely) Skips over the first count chars in the string. Use `String.drop` for a safe version. Note: will throw System.ArgumentOutOfRangeException if you try to skip more than the number of chars in the string.
|
||
Full Usage:
String.skipWhile predicate source
Parameters:
char -> bool
source : string
Returns: string
|
|
||
Full Usage:
String.split separators source
Parameters:
seq<string>
source : string
Returns: seq<string>
|
|
||
Full Usage:
String.startsWith subString source
Parameters:
string
source : string
Returns: bool
|
![]() ![]() ![]() ![]() ![]() ![]() Does the source string start with the given subString? -- function wrapper for String.StartsWith method using InvariantCulture.
|
||
Full Usage:
String.take count source
Parameters:
int
source : string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() (Unsafely) Takes the first count chars in the string. Use `String.truncate` for a safe version. Note: will throw System.ArgumentOutOfRangeException if you try to take more than the number of chars in the string.
|
||
Full Usage:
String.takeWhile predicate source
Parameters:
char -> bool
source : string
Returns: string
|
|
||
Full Usage:
String.toArray source
Parameters:
string
Returns: char[]
|
|
||
Full Usage:
String.toCodePoints source
Parameters:
string
Returns: seq<int>
|
|
||
Full Usage:
String.toList source
Parameters:
string
Returns: char list
|
|
||
Full Usage:
String.toLower source
Parameters:
string
Returns: string
|
|
||
Full Usage:
String.toSeq source
Parameters:
string
Returns: seq<char>
|
|
||
Full Usage:
String.toUpper source
Parameters:
string
Returns: string
|
|
||
Full Usage:
String.trim trimChars source
Parameters:
seq<char>
source : string
Returns: string
|
|
||
Full Usage:
String.trimEnd trimChars source
Parameters:
seq<char>
source : string
Returns: string
|
|
||
Full Usage:
String.trimEndWhiteSpaces source
Parameters:
string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() Trims trailing white spaces -- function wrapper for String.TrimEnd method. Note this is distinct from trim which trims the given characters, not white spaces.
|
||
Full Usage:
String.trimStart trimChars source
Parameters:
seq<char>
source : string
Returns: string
|
|
||
Full Usage:
String.trimStartWhiteSpaces source
Parameters:
string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() Trims leading white spaces -- function wrapper for String.TrimStart method. Note this is distinct from trim which trims the given characters, not white spaces.
|
||
Full Usage:
String.trimWhiteSpaces source
Parameters:
string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() Trims leading and trailing white spaces -- function wrapper for String.Trim method. Note this is distinct from trim which trims the given characters, not white spaces.
|
||
Full Usage:
String.truncate count source
Parameters:
int
source : string
Returns: string
|
![]() ![]() ![]() ![]() ![]() ![]() Returns a string that has at most N characters from the beginning of the original string. It returns the original string if it is shorter than count.
|
||
Full Usage:
String.tryFindIndex predicate source
Parameters:
char -> bool
source : string
Returns: int option
|
|
||
Full Usage:
String.tryFindSliceIndex slice source
Parameters:
string
source : string
Returns: int option
The index of the slice or None .
|
![]() ![]() ![]() ![]() ![]() ![]()
Returns the index of the first occurrence of the specified slice in the source.
Returns
|
||
Full Usage:
String.tryHead source
Parameters:
string
Returns: char option
|
|
||
Full Usage:
String.tryItem index source
Parameters:
int
source : string
Returns: char option
|
![]() ![]() ![]() ![]() ![]() ![]() Returns the char (as an Option) at the given index in the source string, returning `None` if out of bounds.
|
||
Full Usage:
String.tryLast source
Parameters:
string
Returns: char option
|
|