Convert a String In C++ To Upper or Lower Case
2013-01-08 18:44
671 查看
#include <algorithm> #include <string> std::string str = "Hello World"; std::transform(str.begin(), str.end(),str.begin(), ::toupper);
#include <algorithm>#include <string>std::string data = "Abc";std::transform(data.begin(), data.end(), data.begin(), ::tolower);
相关文章推荐
- Convert a String In C++ To Upper or Lower Case
- JS:1.8,字符串(string)对象(length,indexOf(),lastIndexOf(),replace(),match(),toUpperCase(),toLowerCase())
- JS:1.8字符串(string)对象(length,indexOf(),lastIndexOf(),replace(),match(),toUpperCase(),toLowerCase())
- Convert string to int in C++
- golang make the first character in a string lowercase/uppercase
- 字符串字符JS:1.8,字符串(string)对象(length,indexOf(),lastIndexOf(),replace(),match(),toUpperCase(),toLowerCas
- [Shell]convert upper case to lower case
- How to convert std::string to LPCWSTR in C++ (Unicode)
- 动手动脑之Stringequals()方法,整理String类的Length(),charAt(),getChars(),replace(),toUpperCase(),toLowerCase(),trim(),toCharArray()使用说明
- Easiest way to convert int to string in C++
- lower case or UPPER CASE hostname in RAC?
- lower case or UPPER CASE hostname in RAC?
- [Shell]convert lower case to upper case
- Convert UTC string to TDatetime in Delphi
- Java toLowerCase()/toUpperCase()方法的使用注意
- How to avoid uppercase function name while using Function in latex?
- Enum to String and vice versa in C++
- Convert Datetime to String in Sql Server (转)
- [C++] Hex string convert to integer with stringstream
- Java toLowerCase()/toUpperCase()方法的使用注意