Class StringExtensions
String extension methods.
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: Kephas.Text
Assembly: Kephas.Core.dll
Syntax
public static class StringExtensions
Methods
| Improve this Doc View SourceFormatWith(String, Object[])
Formats the provided string with the indicated arguments.
Declaration
public static string FormatWith(this string format, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String | format | The string format. |
System.Object[] | args | A variable-length parameters list containing arguments. |
Returns
Type | Description |
---|---|
System.String | The formatted string. |
Split(String, Char[], Char[], Boolean)
Splits the string using a separator and quoting characters.
Declaration
public static IEnumerable<string> Split(this string str, char[] separator, char[] quote, bool removeEmptyEntries = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | str | The string to act on. |
System.Char[] | separator | The separator characters. |
System.Char[] | quote | The quote characters. |
System.Boolean | removeEmptyEntries | Optional. True to remove empty entries. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumeration of string splits. |
Split(String, Func<Char, Boolean>, Boolean)
Splits the string using a controller function.
Declaration
public static IEnumerable<string> Split(this string str, Func<char, bool> isSeparator, bool removeEmptyEntries = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | str | The string to act on. |
System.Func<System.Char, System.Boolean> | isSeparator | The function indicating whether a character is separator. |
System.Boolean | removeEmptyEntries | Optional. True to remove empty entries. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumeration of string splits. |