Add function to convert a string to lowercase
This commit is contained in:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user