![]() |
Paradox Game Engine
v1.0.0 beta06
|
Extensions for string class. More...
Static Public Member Functions | |
static string | SafeTrim (this string value) |
Safely trim a string. More... | |
static int | IndexOf (this StringBuilder builder, char testChar) |
Calculates the index of a char inside the following StringBuilder, equivalent of string.IndexOf(char) for a StringBuilder. More... | |
static int | LastIndexOf (this StringBuilder builder, char testChar, int startIndex=0) |
Calculates the last index of a char inside the following StringBuilder, equivalent of string.LastIndexOf(char) for a StringBuilder. More... | |
static string | Substring (this StringBuilder builder, int startIndex) |
static string | Substring (this StringBuilder builder, int startIndex, int length) |
static bool | EndsWith (this string stringToTest, char endChar) |
Determines whether the end of this string ends by the specified character. More... | |
static bool | EndsWith (this string stringToTest, params char[] endChars) |
Determines whether the end of this string ends by the specified characters. More... | |
static string | ToFormat (this string stringToFormat, params object[] argumentsToFormat) |
Extension to format a string using string.Format(string,object) method by allowing to use it directly on a string. More... | |
static int | IndexOfReverse (this string text, char charToFind, int matchCount=1) |
Reports the index number, or character position, of the first occurrence of the specified Unicode character in the current String object. The search starts at a specified character position starting from the end and examines a specified number of character positions. More... | |
static int | IndexOfReverse (this string text, char charToFind, int startIndexFromEnd, int count, int matchCount=1) |
Reports the index number, or character position, of the first occurrence of the specified Unicode character in the current String object. The search starts at a specified character position starting from the end and examines a specified number of character positions. More... | |
static bool | Contains (this string text, char value) |
Indicate if the string contains a character. More... | |
Extensions for string class.
Definition at line 12 of file StringExtensions.cs.
|
static |
Indicate if the string contains a character.
text | The text |
value | The character to look for. |
Definition at line 190 of file StringExtensions.cs.
|
static |
Determines whether the end of this string ends by the specified character.
stringToTest | The string automatic test. |
endChar | The end character. |
true
if the end of this string ends by the specified character, false
otherwise.Definition at line 86 of file StringExtensions.cs.
|
static |
Determines whether the end of this string ends by the specified characters.
stringToTest | The string automatic test. |
endChars | The end characters. |
true
if the end of this string ends by the specified character, false
otherwise.Definition at line 98 of file StringExtensions.cs.
|
static |
Calculates the index of a char inside the following StringBuilder, equivalent of string.IndexOf(char) for a StringBuilder.
builder | The builder. |
testChar | The test character. |
System.ArgumentNullException | builder |
Definition at line 32 of file StringExtensions.cs.
|
static |
Reports the index number, or character position, of the first occurrence of the specified Unicode character in the current String object. The search starts at a specified character position starting from the end and examines a specified number of character positions.
text | The text. |
charToFind | The character automatic find. |
matchCount | The number of match before stopping. Default is 1 |
System.ArgumentNullException | text |
System.ArgumentOutOfRangeException | matchCount;matchCount must be >= 1 |
Definition at line 126 of file StringExtensions.cs.
|
static |
Reports the index number, or character position, of the first occurrence of the specified Unicode character in the current String object. The search starts at a specified character position starting from the end and examines a specified number of character positions.
text | The text. |
charToFind | The character automatic find. |
startIndexFromEnd | The starting index number for the search relative to the end of the string. |
count | The number of character positions to be examined. |
matchCount | The number of match before stopping. Default is 1 |
System.ArgumentNullException | text |
System.ArgumentOutOfRangeException | count;Count must be a positive value or startIndexFromEnd;StartIndexFromEnd must be a positive value or startIndexFromEnd;StartIndexFromEnd must be within the range of the string length or count;Count must be in the range of the string length minus the startIndexFromEnd |
Definition at line 161 of file StringExtensions.cs.
|
static |
Calculates the last index of a char inside the following StringBuilder, equivalent of string.LastIndexOf(char) for a StringBuilder.
builder | The builder. |
testChar | The test character. |
startIndex | The start index. |
System.ArgumentNullException | builder |
Definition at line 55 of file StringExtensions.cs.
|
static |
Safely trim a string.
value | The string value. can be null |
Definition at line 19 of file StringExtensions.cs.
|
static |
Definition at line 70 of file StringExtensions.cs.
|
static |
Definition at line 75 of file StringExtensions.cs.
|
static |
Extension to format a string using string.Format(string,object) method by allowing to use it directly on a string.
stringToFormat | The string automatic format. |
argumentsToFormat | The arguments automatic format. |
Definition at line 111 of file StringExtensions.cs.