313 return strncmp (chars() + ofs, other.chars(), other.length()) == 0; |
313 return strncmp (chars() + ofs, other.chars(), other.length()) == 0; |
314 } |
314 } |
315 |
315 |
316 // ------------------------------------------------------------------------------------------------- |
316 // ------------------------------------------------------------------------------------------------- |
317 // |
317 // |
318 bool String::starts_with (const String& other) |
318 bool String::starts_with (const String& other) const |
319 { |
319 { |
320 if (length() < other.length()) |
320 if (length() < other.length()) |
321 return false; |
321 return false; |
322 |
322 |
323 return strncmp (chars(), other.chars(), other.length()) == 0; |
323 return strncmp (chars(), other.chars(), other.length()) == 0; |