sources/mystring.cpp

branch
protocol5
changeset 79
62cfb7b97fc0
parent 73
07dda51a7a8e
child 84
3bd32eec3d57
equal deleted inserted replaced
78:c1d43ade656e 79:62cfb7b97fc0
301 return strncmp (chars() + ofs, other.chars(), other.length()) == 0; 301 return strncmp (chars() + ofs, other.chars(), other.length()) == 0;
302 } 302 }
303 303
304 // ------------------------------------------------------------------------------------------------- 304 // -------------------------------------------------------------------------------------------------
305 // 305 //
306 bool String::starts_with (const String& other) 306 bool String::starts_with (const String& other) const
307 { 307 {
308 if (length() < other.length()) 308 if (length() < other.length())
309 return false; 309 return false;
310 310
311 return strncmp (chars(), other.chars(), other.length()) == 0; 311 return strncmp (chars(), other.chars(), other.length()) == 0;

mercurial