to_lower.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_CORE_UTIL_LOWER_STRING_HPP
13 #define MLPACK_CORE_UTIL_LOWER_STRING_HPP
14 
15 namespace mlpack {
16 namespace util {
17 
23 inline std::string ToLower(const std::string& input)
24 {
25  std::string output;
26  std::transform(input.begin(), input.end(), std::back_inserter(output),
27  [](unsigned char c){ return std::tolower(c); });
28  return output;
29 }
30 
31 } // namespace util
32 } // namespace mlpack
33 
34 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
std::string ToLower(const std::string &input)
Convert a string to lowercase letters.
Definition: to_lower.hpp:23