コード例 #1
0
 public static long CountAllSpaces(this string text)
 {
     return text.CountAll(c => (c == ' '));
 }
コード例 #2
0
 public static long CountAllWhitespaceCharacters(this string text)
 {
     return text.CountAll(c => (c.IsWhitespaceCharacter()));
 }
コード例 #3
0
 public static long CountAllLettersAndDigitsAnd(this string text, char additionalCharacterToKeep)
 {
     return text.CountAll(c => (char.IsLetterOrDigit(c) || c == additionalCharacterToKeep));
 }
コード例 #4
0
 public static long CountAllLettersAndDigitsAnd(this string text, char[] additionalCharactersToKeep)
 {
     return text.CountAll(c => (char.IsLetterOrDigit(c) || additionalCharactersToKeep.Contains(c)));
 }
コード例 #5
0
 public static long CountAllLettersAndDigits(this string text)
 {
     return text.CountAll(char.IsLetterOrDigit);
 }
コード例 #6
0
 public static long CountAllLetters(this string text)
 {
     return text.CountAll(char.IsLetter);
 }
コード例 #7
0
 public static long CountAllDigits(this string text)
 {
     return text.CountAll(char.IsDigit);
 }
コード例 #8
0
 public static long CountAll(this string text, char[] charactersToCount)
 {
     return text.CountAll(charactersToCount.Contains);
 }
コード例 #9
0
 public static long CountAll(this string text, char characterToCount)
 {
     return text.CountAll(c => c == characterToCount);
 }