Class providing utility methods on character strings.
More...
|
static int | CountOccurrencesOf (string str, string sub) |
| Counts the occurrences of a substring in a string. More...
|
|
static bool | EndsWithIgnoreCase (string str, string suffix) |
| Checks if a string ends with a specified suffix, ignoring case. More...
|
|
static string | ReplaceFirst (string text, string regex, string replace) |
| Replaces the first occurences of a regular expression. More...
|
|
static string | ToDelimitedString< T > (this IEnumerable< T > enumerable, string delimiter) |
| Aggregates elements into a string using a delimiter. More...
|
|
Class providing utility methods on character strings.
static int Summer.Batch.Common.Util.StringUtils.CountOccurrencesOf |
( |
string |
str, |
|
|
string |
sub |
|
) |
| |
|
static |
Counts the occurrences of a substring in a string.
- Parameters
-
str | The string to search. |
sub | The substring to search for. |
- Returns
- The number of occurrences of sub in str ;
0
if either is null
.
static bool Summer.Batch.Common.Util.StringUtils.EndsWithIgnoreCase |
( |
string |
str, |
|
|
string |
suffix |
|
) |
| |
|
static |
Checks if a string ends with a specified suffix, ignoring case.
- Parameters
-
str | The string to search. |
suffix | The suffix to search for. |
- Returns
- Whether str ends with suffix .
static string Summer.Batch.Common.Util.StringUtils.ReplaceFirst |
( |
string |
text, |
|
|
string |
regex, |
|
|
string |
replace |
|
) |
| |
|
static |
Replaces the first occurences of a regular expression.
- Parameters
-
text | The string to search. |
regex | The regular expression to search for. |
replace | The replacing text. |
- Returns
- The transformed string.
static string Summer.Batch.Common.Util.StringUtils.ToDelimitedString< T > |
( |
this IEnumerable< T > |
enumerable, |
|
|
string |
delimiter |
|
) |
| |
|
static |
Aggregates elements into a string using a delimiter.
- Template Parameters
-
T | the type of the elements to aggregate |
- Parameters
-
enumerable | the enumerable containing the elements to aggregate |
delimiter | the delimiter to use |
- Returns
- a string containing the elements of enumerable separated by the delimiter
The documentation for this class was generated from the following file:
- Summer.Batch.Common/Util/StringUtils.cs