Changeset 93105 in vbox
- Timestamp:
- Dec 30, 2021 11:34:31 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 149119
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/string.h
r91519 r93105 357 357 358 358 /** 359 * Checks if the string starts with @a a_rStart. 360 */ 361 bool startsWith(Bstr const &a_rStart) const; 362 /** 363 * Checks if the string starts with @a a_rStart. 364 */ 365 bool startsWith(RTCString const &a_rStart) const; 366 /** 367 * Checks if the string starts with @a a_pszStart. 368 */ 369 bool startsWith(const char *a_pszStart) const; 370 371 /** 359 372 * Returns true if the member string has no length. 360 373 * This is true for instances created from both NULL and "" input strings. -
trunk/src/VBox/Main/glue/string.cpp
r85314 r93105 272 272 return ucLeft < ucRight ? -1 : 1; 273 273 } 274 } 275 276 277 bool Bstr::startsWith(Bstr const &a_rStart) const 278 { 279 return RTUtf16NCmp(m_bstr, a_rStart.m_bstr, a_rStart.length()) == 0; 280 } 281 282 283 bool Bstr::startsWith(RTCString const &a_rStart) const 284 { 285 return RTUtf16NCmpUtf8(m_bstr, a_rStart.c_str(), RTSTR_MAX, a_rStart.length()) == 0; 286 } 287 288 289 bool Bstr::startsWith(const char *a_pszStart) const 290 { 291 return RTUtf16NCmpUtf8(m_bstr, a_pszStart, RTSTR_MAX, strlen(a_pszStart)) == 0; 274 292 } 275 293
Note:
See TracChangeset
for help on using the changeset viewer.