Returns true if the buffer contains the given string. Ignores leading
whitespace and case.
int len = buffer.length();
char[] chars = buffer.buffer();
while (beginIndex < len && HTTP.isWhitespace(chars[beginIndex])) {
beginIndex++;
}
int size = str.length();
boolean ok = len >= beginIndex + size;
for (int j=0; ok && (j<size); j++) {
char a = chars[beginIndex+j];
char b = str.charAt(j);
if (a != b) {
a = toLower(a);
b = toLower(b);
ok = a == b;
}
}
return ok;