Panzer
Version of the Day
Loading...
Searching...
No Matches
adapters-stk
src
Panzer_STK_TransformBCNameForIOSS.cpp
Go to the documentation of this file.
1
#include "
Panzer_STK_TransformBCNameForIOSS.hpp
"
2
#include "
Panzer_String_Utilities.hpp
"
3
#include <algorithm>
4
#include <cctype>
5
6
std::string
panzer_stk::transformBCNameForIOSS
(std::string& name)
7
{
8
// strip off leading and trailing whitespace just in case this comes
9
// in from input file.
10
panzer::trim
(name);
11
12
// replace internal whitespace with underscores and upper case with lower case.
13
std::transform(name.begin(), name.end(), name.begin(),
14
[](
const
char
c)
15
{
16
if (c ==
' '
)
17
return
'_'
;
18
else
19
return char(std::tolower(c));
20
});
21
return
name;
22
}
Panzer_STK_TransformBCNameForIOSS.hpp
Panzer_String_Utilities.hpp
panzer_stk::transformBCNameForIOSS
std::string transformBCNameForIOSS(std::string &bc_name)
Definition
Panzer_STK_TransformBCNameForIOSS.cpp:6
panzer::trim
void trim(std::string &str)
Removes whitespace at beginning and end of string.
Definition
Panzer_String_Utilities.cpp:48
Generated by
1.10.0