Skip to content

StringUtilities

Static character-class filters that extract or strip specific categories of characters (digits, letters, punctuation, symbols, control characters, whitespace) from a string. (BR-075)

Purpose

  • Static character-class filters that extract or strip specific categories of characters (digits, letters, punctuation, symbols, control characters, whitespace) from a string. (BR-075)

Context

  • Namespace: SAIF.Common.Utility
  • Assembly/package: SAIF.Framework.Common

Public members

Member Signature Purpose
Digits(this string value) public static string Digits(this string value) Returns only the characters for which char.IsDigit is true.
Letters(this string value) public static string Letters(this string value) Returns only the characters for which char.IsLetter is true.
LettersOrDigits(this string value) public static string LettersOrDigits(this string value) Returns only the characters for which char.IsLetterOrDigit is true.
Punctuation(this string value) public static string Punctuation(this string value) Returns only the characters for which char.IsPunctuation is true.
Symbols(this string value) public static string Symbols(this string value) Returns only the characters for which char.IsSymbol is true.
ControlCharacters(this string value) public static string ControlCharacters(this string value) Returns only the characters for which char.IsControl is true.
RemoveControlCharacters(this string value) public static string RemoveControlCharacters(this string value) Returns the string with every control character removed.
RemoveWhiteSpaces(this string value) public static string RemoveWhiteSpaces(this string value) Returns the string with every whitespace character removed.

Sources

  • Common/SAIF.Common/Utility/StringUtilities.cs