Str Type
The main module with functions for transforming strings.
It is implemented as a static class with only static methods.
This is not a module so that only the namespace gets opened with open Str
and not the module of the same name.
Static members
Static member |
Description
|
||
Full Usage:
Str.addPrefix prefix txt
Parameters:
string
txt : string
Returns: string
|
Add a prefix to string
|
||
Full Usage:
Str.addSuffix suffix txt
Parameters:
string
txt : string
Returns: string
|
Add a suffix to string
|
||
Full Usage:
Str.after splitter stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: string
|
Returns everything after first occurrence of a given splitting string. Or fails if splitter is not found. Uses StringComparison.Ordinal
|
||
Full Usage:
Str.afterChar splitter stringToSearchIn
Parameters:
char
stringToSearchIn : string
Returns: string
|
Returns everything after first occurrence of a given splitting character. Or fails if splitter is not found
|
||
Full Usage:
Str.afterCharOrInput splitter stringToSearchIn
Parameters:
char
stringToSearchIn : string
Returns: string
|
Returns everything after first occurrence of a given splitting character. Or full input string if splitter is not found
|
||
Full Usage:
Str.afterOrInput splitter stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: string
|
Returns everything after first occurrence of a given splitting string. Or full input string if splitter is not found. Uses StringComparison.Ordinal
|
||
Full Usage:
Str.before splitter stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: string
|
Returns everything before first occurrence of a given splitting string. Or fails if splitter is not found. Uses StringComparison.Ordinal
|
||
Full Usage:
Str.beforeChar splitter stringToSearchIn
Parameters:
char
stringToSearchIn : string
Returns: string
|
Returns everything before first occurrence of a given splitting character. Or fails if splitter is not found.
|
||
Full Usage:
Str.beforeCharOrInput splitter stringToSearchIn
Parameters:
char
stringToSearchIn : string
Returns: string
|
Returns everything before first occurrence of a given splitting character. Or full input string if splitter is not found.
|
||
Full Usage:
Str.beforeOrInput splitter stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: string
|
Returns everything before first occurrence of a given splitting string. Or full input string if splitter is not found. Uses StringComparison.Ordinal
|
||
Full Usage:
Str.between firstSplitter secondSplitter stringToSplit
Parameters:
string
secondSplitter : string
stringToSplit : string
Returns: string
|
Finds text between two strings e.g.: between "X" "T" "cXabTk" = "ab" Fails if not both splitters are found. Delimiters are excluded in the returned strings
|
||
|
|||
Full Usage:
Str.betweenOrInput firstSplitter secondSplitter stringToSplit
Parameters:
string
secondSplitter : string
stringToSplit : string
Returns: string
|
Finds text between two strings e.g.: between "X" "T" "cXabTk" = "ab" Returns full input string if not both splitters are found. Delimiters are excluded in the returned strings
|
||
Full Usage:
Str.compare strA strB
Parameters:
string
strB : string
Returns: int
|
Compares two specified String objects and returns an integer that indicates their relative position in the sort order, u Uses StringComparison.Ordinal.
|
||
Full Usage:
Str.compareIgnoreCase strA strB
Parameters:
string
strB : string
Returns: int
|
Compares two specified String objects and returns an integer that indicates their relative position in the sort order, Uses StringComparison.OrdinalIgnoreCase.
|
||
Full Usage:
Str.concat separator lines
Parameters:
string
lines : string seq
Returns: string
Modifiers: inline |
Concatenates string with given separator Same as FSharp.Core.String.concat
|
||
Full Usage:
Str.concatLines lines
Parameters:
string seq
Returns: string
Modifiers: inline |
Concatenates string with Environment.NewLine
|
||
Full Usage:
Str.contains stringToFind stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: bool
|
Returns true if a specified substring occurs within this string.
|
||
Full Usage:
Str.containsChar charToFind stringToSearchIn
Parameters:
char
stringToSearchIn : string
Returns: bool
|
Returns true if specified character occurs within this string.
|
||
Full Usage:
Str.containsIgnoreCase stringToFind stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: bool
|
Returns true if a specified substring occurs within this string ignoring casing. uses: stringToSearchIn.IndexOf(stringToFind, StringComparison.OrdinalIgnoreCase) <> -1
|
||
Full Usage:
Str.countChar chr textToSearch
Parameters:
char
textToSearch : string
Returns: int
|
Counts how often a character appears in a string
|
||
Full Usage:
Str.countSubString subString textToSearch
Parameters:
string
textToSearch : string
Returns: int
|
Counts how often a substring appears in a string Uses StringComparison.Ordinal
|
||
Full Usage:
Str.delete textToRemove fromString
Parameters:
string
fromString : string
Returns: string
|
Removes all occurrences of a substring from a string if it exists. same as: (Will return the same string instance, if text to remove is not found) Code:fromString.Replace(textToRemove, "")
|
||
Full Usage:
Str.deleteChar charToRemove fromString
Parameters:
char
fromString : string
Returns: string
|
Removes character from a string if it exists. same as: (Will return the same string instance, if char to remove is not found) Code: fromString.Replace(charToRemove.ToString(), "")
|
||
Full Usage:
Str.endsWith stringToFindAtEnd stringSearchInAtEnd
Parameters:
string
stringSearchInAtEnd : string
Returns: bool
|
Determines whether the end of this string instance matches the specified string, using StringComparison.Ordinal.
|
||
Full Usage:
Str.endsWithIgnoreCase stringToFindAtEnd stringSearchInAtEnd
Parameters:
string
stringSearchInAtEnd : string
Returns: bool
|
Determines whether the end of this string instance matches the specified string, using StringComparison.OrdinalIgnoreCase.
|
||
Full Usage:
Str.equals strA strB
Parameters:
string
strB : string
Returns: bool
|
Determines whether two specified String objects have the same value, using StringComparison.Ordinal.(=fastest comparison)
|
||
Full Usage:
Str.equalsIgnoreCase strA strB
Parameters:
string
strB : string
Returns: bool
|
Determines whether two specified String objects have the same value, using StringComparison.OrdinalIgnoreCase.
|
||
Full Usage:
Str.formatInOneLine s
Parameters:
string
Returns: string
|
Joins string into one line. Replaces line break with a space character. Skips leading whitespace on each line. Joins multiple whitespaces into one. If string is null returns *null string* Does not include surrounding quotes.
|
||
Full Usage:
Str.formatTruncated maxCharCount s
Parameters:
int
s : string
Returns: string
|
Reduces a string length for display to a maximum Length. Shows (..) as placeholder for skipped characters if string is longer than maxCharCount. If maxChars is bigger than 35 the placeholder will include the count of skipped characters: e.g. ( ... and 123 more chars.). maxCharCount will be set to be minimum 6. Returned strings are enclosed in quotation marks: '"'. If input is null it returns *null string*
|
||
Full Usage:
Str.formatTruncatedToMaxLines maxLineCount s
Parameters:
int
s : string
Returns: string
|
Adds a note about trimmed line count if there are more ( ... and %d more lines.). Returned strings are enclosed in quotation marks: '"'. If string is null returns *null string*.
|
||
Full Usage:
Str.get str index
Parameters:
string
-
The input string.
index : int
-
The input index.
Returns: char
The value of the string at the given index.
Modifiers: inline |
Gets an element from an string. (Use string.getNeg(i) function if you want to use negative indices too.)
|
||
Full Usage:
Str.inQuotes txt
Parameters:
string
Returns: string
|
Add a double quote (") at start and end.
|
||
Full Usage:
Str.inSingleQuotes txt
Parameters:
string
Returns: string
|
Add a single quote (') at start and end.
|
||
Full Usage:
Str.indexOfAny anyOf stringToSearchIn
Parameters:
char[]
stringToSearchIn : string
Returns: int
|
Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters.
|
||
Full Usage:
Str.indexOfAnyFrom anyOf startIndex stringToSearchIn
Parameters:
char[]
startIndex : int
stringToSearchIn : string
Returns: int
|
Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters. The search starts at a specified character position.
|
||
Full Usage:
Str.indexOfAnyFromFor anyOf startIndex count stringToSearchIn
Parameters:
char[]
startIndex : int
count : int
stringToSearchIn : string
Returns: int
|
Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters. The search starts at a specified character position and examines a specified number of character positions.
|
||
Full Usage:
Str.indexOfChar charToFind stringToSearchIn
Parameters:
char
stringToSearchIn : string
Returns: int
|
Reports the zero-based index of the first occurrence of the specified Unicode character in this string.
|
||
Full Usage:
Str.indexOfCharFrom charToFind startIndex stringToSearchIn
Parameters:
char
startIndex : int
stringToSearchIn : string
Returns: int
|
Reports the zero-based index of the first occurrence of the specified Unicode character in this string. The search starts at a specified character position.
|
||
Full Usage:
Str.indexOfCharFromFor charToFind startIndex count stringToSearchIn
Parameters:
char
startIndex : int
count : int
stringToSearchIn : string
Returns: int
|
Reports the zero-based index of the first occurrence of the specified character in this instance. The search starts at a specified character position and examines a specified number of character positions. When used in Fable this use the Knuth-Morris-Pratt algorithm via Str.indicesOf
|
||
Full Usage:
Str.indexOfString stringToFind stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: int
|
Reports the zero-based index of the first occurrence of the specified string in this instance, using StringComparison.Ordinal.
|
||
Full Usage:
Str.indexOfStringFrom stringToFind startIndex stringToSearchIn
Parameters:
string
startIndex : int
stringToSearchIn : string
Returns: int
|
Reports the zero-based index of the first occurrence of the specified string in this instance. The search starts at a specified character position, using StringComparison.Ordinal.
|
||
Full Usage:
Str.indexOfStringFromFor stringToFind startIndex count stringToSearchIn
Parameters:
string
startIndex : int
count : int
stringToSearchIn : string
Returns: int
|
Reports the zero-based index of the first occurrence of the specified string in this instance. The search starts at a specified character position and examines a specified number of character positions, using StringComparison.Ordinal. When used in Fable this use the Knuth-Morris-Pratt algorithm via Str.indicesOf
|
||
Full Usage:
Str.indicesOf (text, pattern, searchFromIdx, searchLength, findNoMoreThan)
Parameters:
string
-
The text to search in
pattern : string
-
The pattern to search for
searchFromIdx : int
-
The index to start searching from
searchLength : int
-
The length of the text to search in
findNoMoreThan : int
-
The maximum number of occurrences to find
Returns: ResizeArray<int>
Return s list of the indices of the occurrences of the pattern in the text.
The distance between these indices may be less than the pattern length
Overlapping patterns are returned each time. e.g "abab" in "abababab" will return [0;2;4]
|
The Knuth-Morris-Pratt Algorithm for finding a pattern within a piece of text. With complexity O(n + m)
|
||
Full Usage:
Str.insert startIndex stringToInsert insertIntoThisString
Parameters:
int
stringToInsert : string
insertIntoThisString : string
Returns: string
|
Returns a new string in which a specified string is inserted at a specified index position in this instance.
|
||
Full Usage:
Str.isEmpty txt
Parameters:
string
Returns: bool
Modifiers: inline |
Checks if the string is null or empty. Uses String.IsNullOrEmpty
|
||
Full Usage:
Str.isNotEmpty txt
Parameters:
string
Returns: bool
Modifiers: inline |
Checks if the string is NOT null nor empty. Uses String.IsNullOrEmpty |> not
|
||
Full Usage:
Str.isNotWhite txt
Parameters:
string
Returns: bool
Modifiers: inline |
Checks if the string is NOT null, empty nor just white space. Uses String.IsNullOrWhiteSpace |> not
|
||
Full Usage:
Str.isWhite txt
Parameters:
string
Returns: bool
Modifiers: inline |
Checks if the string is null, empty or just white space. Uses String.IsNullOrWhiteSpace
|
||
Full Usage:
Str.lastIndexOfChar charToFind stringToSearchIn
Parameters:
char
stringToSearchIn : string
Returns: int
|
Returns the zero-based index position of the last occurrence of a specified Unicode character within this instance. Or -1 if not found.
|
||
Full Usage:
Str.lastIndexOfCharFrom charToFind startIndex stringToSearchIn
Parameters:
char
startIndex : int
stringToSearchIn : string
Returns: int
|
Returns the zero-based index position of the last occurrence of a specified Unicode character within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string. Or -1 if not found.
|
||
Full Usage:
Str.lastIndexOfString stringToFind stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: int
|
Returns the zero-based index position of the last occurrence of a specified string within this instance, using StringComparison.Ordinal. Or -1 if not found.
|
||
Full Usage:
Str.lastIndexOfStringFrom stringToFind startIndex stringToSearchIn
Parameters:
string
startIndex : int
stringToSearchIn : string
Returns: int
|
Returns the zero-based index position of the last occurrence of a specified string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string, using StringComparison.Ordinal. Or -1 if not found.
|
||
Full Usage:
Str.low1 txt
Parameters:
string
Returns: string
|
Makes First letter of string to Lowercase if possible.
|
||
Full Usage:
Str.normalize txt
Parameters:
string
Returns: string
|
Removes accents & diacritics from characters first does txt.Normalize(System.Text.NormalizationForm.FormD) and then removes all non-spacing marks eventually returns string.Normalize(NormalizationForm.FormC) (in Fable this just call txt.normalize("NFKD") instead)
|
||
Full Usage:
Str.notContains stringToFind stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: bool
|
Returns true if a specified substring does NOT occurs within this string.
|
||
Full Usage:
Str.notContainsChar charToFind stringToSearchIn
Parameters:
char
stringToSearchIn : string
Returns: bool
|
Returns true if specified character does NOT occurs within this string.
|
||
Full Usage:
Str.padLeft totalWidth txt
Parameters:
int
txt : string
Returns: string
|
Returns a new string that right-aligns the characters in this instance by padding them with spaces on the left, for a specified total length.
|
||
Full Usage:
Str.padLeftWith totalWidth paddingChar txt
Parameters:
int
paddingChar : char
txt : string
Returns: string
|
Returns a new string that right-aligns the characters in this instance by padding them on the left with a specified Unicode character, for a specified total length.
|
||
Full Usage:
Str.padRight totalWidth txt
Parameters:
int
txt : string
Returns: string
|
Returns a new string that left-aligns the characters in this string by padding them with spaces on the right, for a specified total length.
|
||
Full Usage:
Str.padRightWith totalWidth paddingChar txt
Parameters:
int
paddingChar : char
txt : string
Returns: string
|
Returns a new string that left-aligns the characters in this string by padding them on the right with a specified Unicode character, for a specified total length.
|
||
Full Usage:
Str.remove startIndex txt
Parameters:
int
txt : string
Returns: string
|
Returns a new string in which all the characters in the current instance, beginning at a specified position and continuing through the last position, have been deleted.
|
||
Full Usage:
Str.removeFrom startIndex count txt
Parameters:
int
count : int
txt : string
Returns: string
|
Returns a new string in which a specified number of characters in the current instance beginning at a specified position have been deleted.
|
||
Full Usage:
Str.replace oldValue newValue txt
Parameters:
string
newValue : string
txt : string
Returns: string
|
Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string. (Will return the same instance if text to replace is not found)
|
||
Full Usage:
Str.replaceChar oldChar newChar txt
Parameters:
char
newChar : char
txt : string
Returns: string
|
Returns a new string in which all occurrences of a specified Unicode character in this instance are replaced with another specified Unicode character.
|
||
Full Usage:
Str.replaceFirst oldValue newValue txt
Parameters:
string
newValue : string
txt : string
Returns: string
|
Returns a new string in which only the first occurrences of a specified string in the current instance is replaced with another specified string. (Will return the same instance if text to replace is not found)
|
||
Full Usage:
Str.replaceLast oldValue newValue txt
Parameters:
string
newValue : string
txt : string
Returns: string
|
Returns a new string in which only the last occurrences of a specified string in the current instance is replaced with another specified string. (Will return the same instance if text to replace is not found)
|
||
Full Usage:
Str.skip skipLength fromString
Parameters:
int
fromString : string
Returns: string
|
Remove characters from the starts. fromString.Substring(skipLength)
|
||
Full Usage:
Str.slice startIdx endIdx txt
Parameters:
int
endIdx : int
txt : string
Returns: string
|
Allows for negative indices too. -1 is last character The resulting string includes the end index.
|
||
Full Usage:
Str.split splitter stringToSplit
Parameters:
string
stringToSplit : string
Returns: string[]
|
Split string, Remove Empty Entries Like: string.Split([| splitter |], StringSplitOptions.RemoveEmptyEntries)
|
||
Full Usage:
Str.splitChar separator stringToSplit
Parameters:
char
stringToSplit : string
Returns: string[]
|
Split string by a Char, Remove Empty Entries Like: string.Split([| splitter |], StringSplitOptions.RemoveEmptyEntries)
|
||
Full Usage:
Str.splitCharKeep separator stringToSplit
Parameters:
char
stringToSplit : string
Returns: string[]
|
Split string by any of multiple Chars, Keep Empty Entries Like : string.Split([| splitter |], StringSplitOptions.None)
|
||
Full Usage:
Str.splitChars separators stringToSplit
Parameters:
char[]
stringToSplit : string
Returns: string[]
|
Split string by any of multiple Chars, Remove Empty Entries Like: string.Split([| splitter |], StringSplitOptions.RemoveEmptyEntries)
|
||
Full Usage:
Str.splitCharsKeep separators stringToSplit
Parameters:
char[]
stringToSplit : string
Returns: string[]
|
Split string by a Char, Keep Empty Entries Like : string.Split([| splitter |], StringSplitOptions.None)
|
||
Full Usage:
Str.splitKeep splitter stringToSplit
Parameters:
string
stringToSplit : string
Returns: string[]
|
Split string, Keep Empty Entries Like : string.Split([| splitter |], StringSplitOptions.None)
|
||
Full Usage:
Str.splitLines stringToSplit
Parameters:
string
Returns: string[]
|
Split string by "\r\n", "\r" and "\n"
|
||
Full Usage:
Str.splitOnce splitter stringToSplit
Parameters:
string
stringToSplit : string
Returns: string * string
|
Split string into two elements, Fails if splitter is not found. The splitter is not included in the two return strings.
|
||
Full Usage:
Str.splitTwice firstSplitter secondSplitter stringToSplit
Parameters:
string
secondSplitter : string
stringToSplit : string
Returns: string * string * string
|
Finds text before, between and after two strings. e.g.: between "X" "T" "cXabTk" = "c", "ab", "k" Fails if not both splitters are found. Delimiters are excluded in the three returned strings
|
||
Full Usage:
Str.startsWith stringToFindAtStart stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: bool
|
Determines whether the beginning of this string instance matches the specified string, using StringComparison.Ordinal..
|
||
Full Usage:
Str.startsWithIgnoreCase stringToFindAtStart stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: bool
|
Determines whether the beginning of this string instance matches the specified string when compared using StringComparison.OrdinalIgnoreCase.
|
||
Full Usage:
Str.substringFrom startIndex txt
Parameters:
int
txt : string
Returns: string
|
Retrieves a substring from this instance. The substring starts at a specified character position and continues to the end of the string.
|
||
Full Usage:
Str.substringFromFor startIndex length txt
Parameters:
int
length : int
txt : string
Returns: string
|
Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.
|
||
Full Usage:
Str.take takeLength fromString
Parameters:
int
fromString : string
Returns: string
|
Takes a given amount of chars from string. Fails if input is shorter than takeLength. Use String.truncate instead if you want to avoid failing in that case. Code: fromString.Substring(0,takeLength)
|
||
Full Usage:
Str.toCharArray txt
Parameters:
string
Returns: char[]
|
Copies the characters in this instance to a Unicode character array.
|
||
Full Usage:
Str.toCharArrayFromFor startIndex length txt
Parameters:
int
length : int
txt : string
Returns: char[]
|
Copies the characters in a specified substring in this instance to a Unicode character array.
|
||
Full Usage:
Str.toLower txt
Parameters:
string
Returns: string
|
Returns a copy of this String object converted to lowercase using the casing rules of the invariant culture.
|
||
Full Usage:
Str.toUpper txt
Parameters:
string
Returns: string
|
Returns a copy of this String object converted to uppercase using the casing rules of the invariant culture.
|
||
Full Usage:
Str.trim txt
Parameters:
string
Returns: string
|
Removes all leading and trailing white-space characters from the current String object.
|
||
Full Usage:
Str.trimChar trimChar txt
Parameters:
char
txt : string
Returns: string
|
Removes all leading and trailing occurrences of a set of characters specified in an array from the current String object.
|
||
Full Usage:
Str.trimChars trimChars txt
Parameters:
char[]
txt : string
Returns: string
|
Removes all leading and trailing occurrences of a set of characters specified in an array from the current String object.
|
||
Full Usage:
Str.trimEnd txt
Parameters:
string
Returns: string
|
Removes all trailing whitespace.
|
||
Full Usage:
Str.trimEndChar trimChar txt
Parameters:
char
txt : string
Returns: string
|
Removes all trailing occurrences of a characters specified in an array from the current String object.
|
||
Full Usage:
Str.trimEndChars trimChars txt
Parameters:
char[]
txt : string
Returns: string
|
Removes all trailing occurrences of a set of characters specified in an array from the current String object.
|
||
Full Usage:
Str.trimStart txt
Parameters:
string
Returns: string
|
Removes all leading whitespace.
|
||
Full Usage:
Str.trimStartChar trimChar txt
Parameters:
char
txt : string
Returns: string
|
Removes all leading occurrences of a characters specified in an array from the current String object.
|
||
Full Usage:
Str.trimStartChars trimChars txt
Parameters:
char[]
txt : string
Returns: string
|
Removes all leading occurrences of a set of characters specified in an array from the current String object.
|
||
Full Usage:
Str.truncate truncateLength fromString
Parameters:
int
fromString : string
Returns: string
|
Takes at most a given amount of chars from string. If input is shorter than truncateLength returns input string unchanged. Alternatively use the functions that include formatting: Str.Format.stringTruncated and Str.Format.stringInOneLine Str.Format.stringTruncatedToMaxLines
|
||
Full Usage:
Str.tryAfter splitter stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: string option
|
Returns everything after first occurrence of a given splitting string. Or None if splitter is not found Uses StringComparison.Ordinal
|
||
Full Usage:
Str.tryAfterChar splitter stringToSearchIn
Parameters:
char
stringToSearchIn : string
Returns: string option
|
Returns everything after first occurrence of a given splitting character. Or None if splitter is not found
|
||
Full Usage:
Str.tryBefore splitter stringToSearchIn
Parameters:
string
stringToSearchIn : string
Returns: string option
|
Returns everything before first occurrence of a given splitting string. Or None if splitter is not found. Uses StringComparison.Ordinal
|
||
Full Usage:
Str.tryBeforeChar splitter stringToSearchIn
Parameters:
char
stringToSearchIn : string
Returns: string option
|
Returns everything before first occurrence of a given splitting character. Or None if splitter is not found.
|
||
Full Usage:
Str.tryBetween firstSplitter secondSplitter stringToSplit
Parameters:
string
secondSplitter : string
stringToSplit : string
Returns: string option
|
Finds text between two strings e.g.: between "X" "T" "cXabTk" = "ab" Returns None if not both splitters are found. Delimiters are excluded in the returned strings
|
||
Full Usage:
Str.trySplitOnce splitter stringToSplit
Parameters:
string
stringToSplit : string
Returns: (string * string) option
|
Split string into two elements, If splitter not found None is returned Splitter is not included in the two return strings.
|
||
Full Usage:
Str.trySplitTwice firstSplitter secondSplitter stringToSplit
Parameters:
string
secondSplitter : string
stringToSplit : string
Returns: (string * string * string) option
|
Finds text before, between and after two strings. e.g.: between "X" "T" "cXabTk" = "c", "ab", "k" If not both splitters are found returns None Delimiters are excluded in the three returned strings
|
||
Full Usage:
Str.unifyLineEndings txt
Parameters:
string
Returns: string
|
Ensures all lines end on System.Environment.NewLine Code: StringBuilder(s).Replace("\r\n", "\n").Replace("\r", "\n").Replace("\n", Environment.NewLine).ToString()
|
||
Full Usage:
Str.up1 txt
Parameters:
string
Returns: string
|
Makes First letter of string to Uppercase if possible.
|