Add function to convert a string to lowercase

This commit is contained in:
2015-02-21 21:34:32 +00:00
parent 5a98b50e59
commit 64ecfbf016
+8
View File
@@ -26,6 +26,7 @@
#define __TYPEDEF_H__
#include <string>
#include <algorithm>
namespace plaYUVer
{
@@ -116,6 +117,13 @@ enum RGBcomponent
COLOR_A,
};
inline std::string lowercase( const std::string& in )
{
std::string out;
transform( in.begin(), in.end(), std::back_inserter( out ), tolower );
return out;
}
} // NAMESPACE
#endif // __TYPEDEF_H__