Changeset 101343 in vbox for trunk/include/iprt/cpp
- Timestamp:
- Oct 4, 2023 7:30:37 PM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpp/ministring.h
r98103 r101343 1258 1258 1259 1259 /** 1260 * Returns true if @a this ends with @a that. 1261 * 1262 * @param a_pszSuffix The suffix to test for. 1263 * @returns true if match, false if mismatch. 1264 */ 1265 bool endsWith(const char *a_pszSuffix) const RT_NOEXCEPT; 1266 1267 /** 1268 * Returns true if @a this ends with @a a_pszSuffix of @a a_cchSuffix length 1269 * (case sensitive compare). 1270 * 1271 * @param a_pszSuffix The suffix to test for. 1272 * @param a_cchSuffix The length of the suffix string. 1273 * @returns true if match, false if mismatch. 1274 */ 1275 bool endsWith(const char *a_pszSuffix, size_t a_cchSuffix) const RT_NOEXCEPT; 1276 1277 /** 1278 * Returns true if @a this ends with @a a_pszSuffix, ignoring case when 1279 * comparing. 1280 * 1281 * @param a_pszSuffix The suffix to test for. 1282 * @returns true if match, false if mismatch. 1283 */ 1284 bool endsWithI(const char *a_pszSuffix) const RT_NOEXCEPT; 1285 1286 /** 1287 * Returns true if @a this ends with @a a_pszSuffix of @a a_cchSuffix length, 1288 * ignoring case when comparing. 1289 * 1290 * @param a_pszSuffix The suffix to test for. 1291 * @param a_cchSuffix The length of the suffix string. 1292 * @returns true if match, false if mismatch. 1293 */ 1294 bool endsWithI(const char *a_pszSuffix, size_t a_cchSuffix) const RT_NOEXCEPT; 1295 1296 /** 1297 * Returns true if @a this ends with @a a_pszSuffix, selective case version. 1298 * 1299 * @param a_pszSuffix The suffix to test for. 1300 * @param enmCase Case sensitivity selector. 1301 * @returns true if match, false if mismatch. 1302 */ 1303 inline bool endsWith(const char *a_pszSuffix, CaseSensitivity enmCase) const RT_NOEXCEPT 1304 { 1305 if (enmCase == CaseSensitive) 1306 return endsWith(a_pszSuffix); 1307 return endsWithI(a_pszSuffix); 1308 } 1309 1310 /** 1311 * Returns true if @a this ends with @a a_pszSuffix of @a a_cchSuffix length, 1312 * selective case version. 1313 * 1314 * @param a_pszSuffix The suffix to test for. 1315 * @param a_cchSuffix The length of the suffix string. 1316 * @param enmCase Case sensitivity selector. 1317 * @returns true if match, false if mismatch. 1318 */ 1319 inline bool endsWith(const char *a_pszSuffix, size_t a_cchSuffix, CaseSensitivity enmCase) const RT_NOEXCEPT 1320 { 1321 if (enmCase == CaseSensitive) 1322 return endsWith(a_pszSuffix, a_cchSuffix); 1323 return endsWithI(a_pszSuffix, a_cchSuffix); 1324 } 1325 1326 /** 1260 1327 * Returns true if @a this begins with @a that. 1261 1328 * @param that Prefix to test for.
Note:
See TracChangeset
for help on using the changeset viewer.