Added a to_lower_case function

unix_test
anulax1225 ago%!(EXTRA string=1 year)
parent 750f8002e9
commit 8fdd4be2ac
  1. 9
      sandbox/server/http/http_tools.cpp
  2. 1
      sandbox/server/http/http_tools.h

@ -1,5 +1,14 @@
#include "http_tools.h"
std::string string_to_lower(std::string& str)
{
for (int i = 0; i < str.length(); i++)
{
str[i] = std::tolower(str[i]);
}
return str;
}
std::string string_to_upper(std::string& str)
{
for (int i = 0; i < str.length(); i++)

@ -2,6 +2,7 @@
#include <commun.h>
std::string string_to_lower(std::string& str);
std::string string_to_upper(std::string& str);
std::unique_ptr<std::vector<std::string>> string_split(std::string s, std::string delimiter, int cpt = -1);
std::string string_trim(const std::string& str, const std::string& whitespace = " ");
Loading…
Cancel
Save