Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
src
IO
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
6
namespace
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
StrUtilities.h
c
c
Definition
int_R.m:15
x
x
Definition
int_R.m:12
model
Definition
DD_converter.dox:2
model::StrUtilities::lowercase
static std::string lowercase(std::string text)
Definition
StrUtilities.cpp:15
model::StrUtilities::removeSpaces
static std::string removeSpaces(std::string key)
Definition
StrUtilities.cpp:9
text
std::string text(Config &config)
Definition
testDDconfigEllipsoidalIO.cpp:15
key
newbad key
Definition
triangle.cpp:7029
Generated by
1.15.0