1
#include "mystring.h"
2
#include <string.h>
3
4
int mystring::find_first(char ch, size_t offset) const
5
{
6
if(offset >= rep->length)
7
return -1;
8
char* ptr = strchr(rep->buf+offset, ch);
9
return ptr ? ptr-rep->buf : -1;
10
}
11