in commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/url/UrlFileNameParser.java [49:70]
protected int countSlashes(final String fileName) {
int state = 0;
int nuofSlash = 0;
for (int pos = 0; pos < fileName.length(); pos++) {
final char c = fileName.charAt(pos);
if (state == 0) {
if (c >= 'a' && c <= 'z') {
continue;
}
if (c == ':') {
state++;
continue;
}
} else if (state == 1) {
if (c != '/') {
return nuofSlash;
}
nuofSlash++;
}
}
return nuofSlash;
}