//package org.anddev.andengine.util;
/**
* (c) 2010 Nicolas Gramlich
* (c) 2011 Zynga Inc.
*
* @author Nicolas Gramlich
* @since 19:01:08 - 03.04.2010
*/
class StringUtils {
public static int countOccurrences(final String pString, final char pCharacter) {
int count = 0;
int lastOccurrence = pString.indexOf(pCharacter, 0);
while (lastOccurrence != -1) {
count++;
lastOccurrence = pString.indexOf(pCharacter, lastOccurrence + 1);
}
return count;
}
}