Changeset 18528 in vbox
- Timestamp:
- Mar 30, 2009 11:51:31 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
include/iprt/string.h (modified) (1 diff)
-
src/VBox/Runtime/common/string/utf-8.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/string.h
r18525 r18528 970 970 size_t *poffPattern); 971 971 972 /** 973 * Converts the string to lower case. 974 * 975 * @returns Pointer to the converted string. 976 * @param psz The string to convert. 977 */ 978 RTDECL(char *) RTStrToLower(char *psz); 979 980 /** 981 * Converts the string to upper case. 982 * 983 * @returns Pointer to the converted string. 984 * @param psz The string to convert. 985 */ 986 RTDECL(char *) RTStrToUpper(char *psz); 987 972 988 /** @defgroup rt_str_conv String To/From Number Conversions 973 989 * @ingroup grp_rt_str -
trunk/src/VBox/Runtime/common/string/utf-8.cpp
r17189 r18528 1370 1370 } 1371 1371 1372 RTDECL(char *) RTStrToLower(char *psz) 1373 { 1374 char *pszTmp = psz; 1375 while(*pszTmp) 1376 { 1377 /* Get the codepoints */ 1378 RTUNICP cp = RTStrGetCp(pszTmp); 1379 /* To lower */ 1380 cp = RTUniCpToLower(cp); 1381 /* Put the converted codepoint back */ 1382 pszTmp = RTStrPutCp(pszTmp, cp); 1383 } 1384 return psz; 1385 } 1386 1387 RTDECL(char *) RTStrToUpper(char *psz) 1388 { 1389 char *pszTmp = psz; 1390 while(*pszTmp) 1391 { 1392 /* Get the codepoints */ 1393 RTUNICP cp = RTStrGetCp(pszTmp); 1394 /* To lower */ 1395 cp = RTUniCpToUpper(cp); 1396 /* Put the converted codepoint back */ 1397 pszTmp = RTStrPutCp(pszTmp, cp); 1398 } 1399 return psz; 1400 } 1401
Note:
See TracChangeset
for help on using the changeset viewer.

