… | |
… | |
70 | return length () >= plen && !strncasecmp (s, prefix, plen); |
70 | return length () >= plen && !strncasecmp (s, prefix, plen); |
71 | } |
71 | } |
72 | |
72 | |
73 | bool contains (const char *substring) const |
73 | bool contains (const char *substring) const |
74 | { |
74 | { |
75 | return strstr (s, substring); |
75 | return s != null () && strstr (s, substring); |
76 | } |
76 | } |
77 | |
77 | |
78 | //TODO: case sensitive should be eradicated |
78 | //TODO: case sensitive should be eradicated |
79 | bool eq_nc (const char *otherstring) const |
79 | bool eq_nc (const char *otherstring) const |
80 | { |
80 | { |
… | |
… | |
249 | #undef def |
249 | #undef def |
250 | #undef def2 |
250 | #undef def2 |
251 | |
251 | |
252 | // undefined external reference to catch people using str* functions when they shouldn't |
252 | // undefined external reference to catch people using str* functions when they shouldn't |
253 | //template<class any> void strcmp (const shstr_tmp &a, any b); |
253 | //template<class any> void strcmp (const shstr_tmp &a, any b); |
254 | //template<class any> void strstr (const shstr_tmp &a, any b); |
254 | template<class any> void strstr (const shstr_tmp &a, any b); |
255 | |
255 | |
256 | #endif |
256 | #endif |
257 | |
257 | |