public static Int32 Occurs(this String source, char pattern) { if (null==pattern) return 0; return source.Split(pattern).Length - 1; }