Guest User

Untitled

a guest
Nov 23rd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. public static int WordCount(this string str, char c)
  2. {
  3. int counter = 0;
  4. for (int i = 0; i < str.Length; i++)
  5. {
  6. if (str[i] == c)
  7. counter++;
  8. }
  9. return counter;
  10. }
Add Comment
Please, Sign In to add comment