![]() |
Diffusion .NET Classic API - Core and Common
5.9.4
|
String extension methods. More...
Static Public Member Functions | |
static string | CaseInsenstiveReplace (this string val, char charToReplace, char replacement) |
Replaces a given character with another character in a string. The replacement is case insensitive Test Coverage: Included More... | |
static string | CaseInsenstiveReplace (this string val, string stringToReplace, string replacement) |
Replaces a given string with another string in a given string. The replacement is case insensitive Test Coverage: Included More... | |
static string | ReplaceFirst (this string val, string stringToReplace, string replacement) |
Replaces the first occurrence of a string with another string in a given string The replacement is case insensitive Test Coverage: Included More... | |
static string | ReplaceFirst (this string val, char charToReplace, char replacement) |
Replaces the first occurrence of a character with another character in a given string The replacement is case insensitive Test Coverage: Included More... | |
static string | ReplaceLast (this string val, char charToReplace, char replacement) |
Replaces the last occurrence of a character with another character in a given string The replacement is case insensitive Test Coverage: Included More... | |
static string | ReplaceLast (this string val, string stringToReplace, string replacement) |
Replaces the last occurrence of a string with another string in a given string The replacement is case insensitive Test Coverage: Included More... | |
static string | RemoveWords (this string val, params string[] filterWords) |
Removes occurrences of words in a string The match is case sensitive Test Coverage: Included More... | |
static string | MaskWords (this string val, char mask, params string[] filterWords) |
Masks the occurence of words in a string with a given character Test Coverage: Included More... | |
static string | PadLeft (this string val, string pad, int totalWidth) |
Left pads the passed string using the passed pad string for the total number of spaces. It will not cut-off the pad even if it causes the string to exceed the total width. Test Coverage: Included More... | |
static string | PadLeft (this string val, string pad, int totalWidth, bool cutOff) |
Left pads the passed string using the passed pad string for the total number of spaces. More... | |
static string | PadRight (this string val, string pad, int totalWidth) |
Right pads the passed string using the passed pad string for the total number of spaces. It will not cut-off the pad even if it causes the string to exceed the total width. Test Coverage: Included More... | |
static string | PadRight (this string val, string pad, int totalWidth, bool cutOff) |
Right pads the passed string using the passed pad string for the total number of spaces. More... | |
static string | RemoveNewLines (this string val) |
Removes new line characters from a string Test Coverage: Included More... | |
static string | RemoveNewLines (this string input, bool addSpace) |
Removes new line characters from a string Test Coverage: Included More... | |
static string | RemoveNonNumeric (this string s) |
Removes a non numeric character from a string Test Coverage: Included More... | |
static string | RemoveNumeric (this string s) |
Removes numeric characters from a given string Test Coverage: Included More... | |
static string | Reverse (this string val) |
Reverses a string Test Coverage: Included More... | |
static string | SentenceCase (this string val) |
Changes the string as sentence case. Test Coverage: Included More... | |
static string | TitleCase (this string val) |
Changes the string as title case. Ignores short words in the string. Test Coverage: Included More... | |
static string | TitleCase (this string val, bool ignoreShortWords) |
Changes the string as title case. Test Coverage: Included More... | |
static string | TrimIntraWords (this string val) |
Removes multiple spaces between words Test Coverage: Included More... | |
static string | WordWrap (this string val, int charCount) |
Test Coverage: Included More... | |
static string | WordWrap (this string val, int charCount, bool cutOff) |
Wraps the passed string at the passed total number of characters (if cuttOff is true) or at the next whitespace (if cutOff is false). Uses the environment new line symbol for the break text More... | |
static string | ToCSV (this IEnumerable< string > val, bool insertSpaces) |
Converts an list of string to CSV string representation. Test Coverage: Included More... | |
static string | ToCSV (this IEnumerable< char > val, bool insertSpaces) |
Converts an list of characters to CSV string representation. Test Coverage: Included More... | |
static IEnumerable< string > | ListFromCSV (this string val) |
Converts CSV to list of string. Test Coverage: Included More... | |
static void | Serialize (this string val, string filePath) |
Binary Serialization to a file More... | |
String extension methods.
|
static |
Replaces a given character with another character in a string. The replacement is case insensitive Test Coverage: Included
val | |
charToReplace | The character to replace |
replacement | The character by which to be replaced |
|
static |
Replaces a given string with another string in a given string. The replacement is case insensitive Test Coverage: Included
val | |
stringToReplace | The string to replace |
replacement | The string by which to be replaced |
|
static |
Converts CSV to list of string. Test Coverage: Included
val |
|
static |
Masks the occurence of words in a string with a given character Test Coverage: Included
val | |
mask | The character mask to apply |
filterWords | The words to be replaced |
|
static |
Left pads the passed string using the passed pad string for the total number of spaces. It will not cut-off the pad even if it causes the string to exceed the total width. Test Coverage: Included
val | |
pad | The pad string |
totalWidth | The total width of the resulting string |
|
static |
Left pads the passed string using the passed pad string for the total number of spaces.
val | |
pad | The pad string |
totalWidth | The total width of the resulting string |
cutOff | True to cut off the characters if exceeds the specified width |
|
static |
Right pads the passed string using the passed pad string for the total number of spaces. It will not cut-off the pad even if it causes the string to exceed the total width. Test Coverage: Included
val | |
pad | The pad string |
totalWidth | The total width of the resulting string |
|
static |
Right pads the passed string using the passed pad string for the total number of spaces.
val | |
pad | The pad string |
totalWidth | The total width of the resulting string |
cutOff | True to cut off the characters if exceeds the specified width |
|
static |
Removes new line characters from a string Test Coverage: Included
val |
|
static |
Removes new line characters from a string Test Coverage: Included
input | |
addSpace | True to add a space after removing a new line character |
|
static |
Removes a non numeric character from a string Test Coverage: Included
s |
|
static |
Removes numeric characters from a given string Test Coverage: Included
s |
|
static |
Removes occurrences of words in a string The match is case sensitive Test Coverage: Included
val | |
filterWords | Array of words to be removed from the string |
|
static |
Replaces the first occurrence of a string with another string in a given string The replacement is case insensitive Test Coverage: Included
val | |
stringToReplace | The string to replace |
replacement | The string by which to be replaced |
|
static |
Replaces the first occurrence of a character with another character in a given string The replacement is case insensitive Test Coverage: Included
val | |
charToReplace | The character to replace |
replacement | The character by which to replace |
|
static |
Replaces the last occurrence of a character with another character in a given string The replacement is case insensitive Test Coverage: Included
val | |
charToReplace | The character to replace |
replacement | The character by which to replace |
|
static |
Replaces the last occurrence of a string with another string in a given string The replacement is case insensitive Test Coverage: Included
val | |
stringToReplace | The string to replace |
replacement | The string by which to be replaced |
|
static |
Reverses a string Test Coverage: Included
val |
|
static |
Changes the string as sentence case. Test Coverage: Included
val |
|
static |
Binary Serialization to a file
val | |
filePath | The file where serialized data has to be stored |
|
static |
Changes the string as title case. Ignores short words in the string. Test Coverage: Included
val |
|
static |
Changes the string as title case. Test Coverage: Included
val | |
ignoreShortWords | true to ignore short words |
|
static |
Converts an list of string to CSV string representation. Test Coverage: Included
val | |
insertSpaces | True to add spaces after each comma |
|
static |
Converts an list of characters to CSV string representation. Test Coverage: Included
val | |
insertSpaces | True to add spaces after each comma |
|
static |
Removes multiple spaces between words Test Coverage: Included
val |
|
static |
Test Coverage: Included
val | |
charCount | The number of characters after which it should wrap the text |
|
static |
Wraps the passed string at the passed total number of characters (if cuttOff is true) or at the next whitespace (if cutOff is false). Uses the environment new line symbol for the break text
val | |
charCount | The number of characters after which to break |
cutOff | true to break at specific |