Class StringExtensions
Extension methods for System.String.
Inheritance
System.Object
StringExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Codecrete.SwissQRBill.Generator
Assembly: Codecrete.SwissQRBill.Core.dll
Syntax
public static class StringExtensions
Methods
| Improve this Doc View SourceAppendCodePoint(StringBuilder, Int32)
Appends the given Unicode code point to this instance.
Declaration
public static void AppendCodePoint(this StringBuilder sb, int codePoint)
Parameters
Type | Name | Description |
---|---|---|
System.Text.StringBuilder | sb | this instance |
System.Int32 | codePoint | the Unicode code point |
SpacesCleaned(String)
Returns a new string without leading and trailing spaces and with all consecutive space characters replaced by a single space.
Whitespace other than space characters are not cleaned.
Declaration
public static string SpacesCleaned(this string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string instance that this method extends |
Returns
Type | Description |
---|---|
System.String | The resulting string with all whitespace removed. |
Trimmed(String)
Returns a new string with leading and trailing whitespace removed.
For empty strings or null
, null
is returned.
Declaration
public static string Trimmed(this string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string instance that this method extends or |
Returns
Type | Description |
---|---|
System.String | The trimmed string or |
WhiteSpaceRemoved(String)
Returns a new string without white space.
Declaration
public static string WhiteSpaceRemoved(this string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string instance that this method extends |
Returns
Type | Description |
---|---|
System.String | The resulting string with all whitespace removed. |