Beatmup
Beatmup::StringUtils Namespace Reference

Handy utilities for strings. More...

Functions

std::string lowercase (const std::string &str)
 Converts a string to lower case (latin letters only). More...
 

Detailed Description

Handy utilities for strings.

Function Documentation

◆ lowercase()

std::string Beatmup::StringUtils::lowercase ( const std::string &  str)

Converts a string to lower case (latin letters only).

Definition at line 24 of file string_utils.cpp.

24  {
25  std::string result(str);
26 
27  std::transform(result.begin(), result.end(), result.begin(), [](char c){
28  return ('A' <= c && c <= 'Z') ? c - ('A' - 'a') : c;
29  });
30 
31  return result;
32 }
Beatmup::IntPoint result
JNIEnv jobject jstring str