Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
StrUtilities.cpp
Go to the documentation of this file.
1/* This file is part of MoDELib, distributed under GNU GPL v2. */
2#include <StrUtilities.h>
3#include <algorithm>
4#include <cctype>
5
6namespace model
7{
8
9 auto StrUtilities::removeSpaces(std::string key) -> std::string
10 {
11 key.erase(std::remove_if(key.begin(), key.end(), [](unsigned char x) { return std::isspace(x); }), key.end());
12 return key;
13 }
14
15 auto StrUtilities::lowercase(std::string text) -> std::string
16 {
17 std::transform(text.begin(), text.end(), text.begin(), [](unsigned char c) { return std::tolower(c); });
18 return text;
19 }
20} // namespace model
c
Definition int_R.m:15
x
Definition int_R.m:12
static std::string lowercase(std::string text)
static std::string removeSpaces(std::string key)
std::string text(Config &config)
newbad key