+size_t GrowingBuffer::indexOf(char c, size_t start) {
+ void* foundIndex;
+
+ GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] searching for (char) 0x%02x from %d to %d.\n", __FILE__, __LINE__, c, position + start, position + (limit - start));
+ foundIndex = memchr((char*) data + position + start, c, (limit - (position + start)));
+ if (foundIndex) {
+ GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] found character at %d.\n", __FILE__, __LINE__, (char*) foundIndex - ((char*) data + position));
+ return (char*) foundIndex - ((char*) data - position);
+ }
+ return (size_t) -1;
+}
+