VirtualBox

Changeset 93105 in vbox for trunk/src/VBox/Main/glue


Ignore:
Timestamp:
Dec 30, 2021 11:34:31 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
149119
Message:

Main/glue: Added Bstr::startsWith methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/string.cpp

    r85314 r93105  
    272272        return ucLeft < ucRight ? -1 : 1;
    273273    }
     274}
     275
     276
     277bool Bstr::startsWith(Bstr const &a_rStart) const
     278{
     279    return RTUtf16NCmp(m_bstr, a_rStart.m_bstr, a_rStart.length()) == 0;
     280}
     281
     282
     283bool 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
     289bool Bstr::startsWith(const char *a_pszStart) const
     290{
     291    return RTUtf16NCmpUtf8(m_bstr, a_pszStart, RTSTR_MAX, strlen(a_pszStart)) == 0;
    274292}
    275293
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette