Class StringHelper
Assembly: SoCore.dll
Syntax
public static class StringHelper : Object
Methods
ConvertDoubledQuotesToBackslashQuote(String)
Converts a string containing '' doubled escaped quotes to ' backslash escaped quotes
Declaration
public static string ConvertDoubledQuotesToBackslashQuote(string restrictions)
Parameters
Type |
Name |
Description |
String |
restrictions |
"foo''bar"
|
Returns
Type |
Description |
String |
"foo'bar"
|
Deinternationalize(String)
Converts most letters outside ASCII-range to their ASCII counterparts.
Make them email-friendly.
Ø -> O
Å -> A
Ü -> U
Etc.
Declaration
public static string Deinternationalize(string source)
Parameters
Type |
Name |
Description |
String |
source |
|
Returns
IsNonEmptyStringMatch(String, String)
Declaration
public static bool IsNonEmptyStringMatch(string a, string b)
Parameters
Returns
NewlineNormalized(String)
Declaration
public static string NewlineNormalized(this string source)
Parameters
Type |
Name |
Description |
String |
source |
|
Returns
PrettyChop(String, Int32)
Chop off a string in a nice fashion: will chop a string if longer than maxLength, and pad it with "...". Please note, that PrettyChop(xx, 111) will return a string of maximum 114 characters.
Declaration
public static string PrettyChop(string s, int maxLength)
Parameters
Type |
Name |
Description |
String |
s |
string to be chopped
|
Int32 |
maxLength |
|
Returns
Type |
Description |
String |
chopped string
|