Skip to content

BizArk.Core.Extensions.StringExt

Brian Brewder edited this page Apr 2, 2017 · 1 revision

Back to BizArk.Core API Reference

Provides extension methods for strings.

Static Properties

  • public static byte DefaultWrapTabWidth { get; set; } - Gets or sets the size of a TAB (number of spaces). Used for calculating word wraps.
  • public static char[] Vowels { get; set; }= { 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U' }; - Vowels. Used for IsVowel.

Static Methods - String

Static Methods - StringBuilder

  • public static StringBuilder AppendIf(this StringBuilder sb, bool condition, string value) - Appends a copy of the specified string to this instance if the condition is true.
  • public static StringBuilder AppendIf(this StringBuilder sb, string value) - Appends a copy of the specified string to this instance if the value is not null or empty.
  • public static StringBuilder AppendLineIf(this StringBuilder sb, bool condition, string value) - Appends a copy of the specified string followed by the default line terminator to the end of the current System.Text.StringBuilder object if the condition is true.
  • public static StringBuilder AppendLineIf(this StringBuilder sb, string value) - Appends a copy of the specified string followed by the default line terminator to the end of the current System.Text.StringBuilder object if the value is not null or empty.
  • public static string IfEmpty(this StringBuilder sb, string dflt) - If the string is empty, returns the default.
  • public static string Substring(this StringBuilder sb, int startIndex) - Retrieves a substring from this instance. The substring starts at a specified character position and continues to the end of the string.
  • public static string Substring(this StringBuilder sb, int startIndex, int length) - Retrieves a substring from this instance. The substring starts at a specified character position and continues to the end of the string.
  • public static string Trim(this StringBuilder sb) - Removes all leading and trailing white-space characters from the current System.String object.
  • public static string TrimEnd(this StringBuilder sb) - Removes all trailing occurrences of a set of characters specified in an array from the current System.String object.

Clone this wiki locally