lib/mystring/find_first_ch.cc
changeset 0 6f7a81934006
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/mystring/find_first_ch.cc	Wed Jan 16 22:39:43 2008 +0100
@@ -0,0 +1,11 @@
+#include "mystring.h"
+#include <string.h>
+
+int mystring::find_first(char ch, size_t offset) const
+{
+  if(offset >= rep->length)
+    return -1;
+  char* ptr = strchr(rep->buf+offset, ch);
+  return ptr ? ptr-rep->buf : -1;
+}
+