Changeset 101343 in vbox for trunk/src/VBox/Runtime/common/string
- Timestamp:
- Oct 4, 2023 7:30:37 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/ministring.cpp
r98103 r101343 1038 1038 } 1039 1039 1040 bool RTCString::endsWith(const char *a_pszSuffix, size_t a_cchSuffix) const RT_NOEXCEPT 1041 { 1042 Assert(RTStrNLen(a_pszSuffix, a_cchSuffix) == a_cchSuffix); 1043 return a_cchSuffix > 0 1044 && a_cchSuffix <= length() 1045 && ::memcmp(&m_psz[length() - a_cchSuffix], a_pszSuffix, a_cchSuffix) == 0; 1046 } 1047 1048 bool RTCString::endsWith(const char *a_pszSuffix) const RT_NOEXCEPT 1049 { 1050 return endsWith(a_pszSuffix, strlen(a_pszSuffix)); 1051 } 1052 1053 bool RTCString::endsWithI(const char *a_pszSuffix, size_t a_cchSuffix) const RT_NOEXCEPT 1054 { 1055 Assert(RTStrNLen(a_pszSuffix, a_cchSuffix) == a_cchSuffix); 1056 return a_cchSuffix > 0 1057 && a_cchSuffix <= length() 1058 && ::RTStrNICmp(&m_psz[length() - a_cchSuffix], a_pszSuffix, a_cchSuffix) == 0; 1059 } 1060 1061 bool RTCString::endsWithI(const char *a_pszSuffix) const RT_NOEXCEPT 1062 { 1063 return endsWithI(a_pszSuffix, strlen(a_pszSuffix)); 1064 } 1065 1040 1066 bool RTCString::startsWith(const RTCString &that, CaseSensitivity cs /*= CaseSensitive*/) const RT_NOEXCEPT 1041 1067 {
Note:
See TracChangeset
for help on using the changeset viewer.