ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/shstr.h
(Generate patch)

Comparing deliantra/server/include/shstr.h (file contents):
Revision 1.30 by root, Thu Jan 1 16:05:12 2009 UTC vs.
Revision 1.32 by root, Thu Jan 1 20:49:48 2009 UTC

68 int plen = strlen (prefix); 68 int plen = strlen (prefix);
69 69
70 return length () >= plen && !strncasecmp (s, prefix, plen); 70 return length () >= plen && !strncasecmp (s, prefix, plen);
71 } 71 }
72 72
73 // returns true if the substring is contained in the shstr
74 // if the shstr is 0, then this always returns false.
75 // the shstr is (theoretically) treated as a comma/colon/space etc. separated list.
73 bool contains (const char *substring) const 76 bool contains (const char *substring) const
74 { 77 {
75 return s != null () && strstr (s, substring); 78 return s != null () && strstr (s, substring);
76 } 79 }
77 80
119inline bool operator !=(const shstr_tmp &a, const shstr_tmp &b) 122inline bool operator !=(const shstr_tmp &a, const shstr_tmp &b)
120{ 123{
121 return a.s != b.s; 124 return a.s != b.s;
122} 125}
123 126
124inline int strlen (const shstr_tmp &sh) 127inline int strlen (shstr_tmp sh)
125{ 128{
126 return sh.length (); 129 return sh.length ();
127} 130}
128 131
129static std::ostream &operator <<(std::ostream &o, shstr_tmp sh) 132static std::ostream &operator <<(std::ostream &o, shstr_tmp sh)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines