summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/utils.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2017-11-23 21:50:16 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2017-12-04 15:47:50 -0300
commitd93e9ff286ce1961f530d56b5536881f47104ebd (patch)
treed9fd8cd25a64b9ab6b23ae34b92c342dc8e6b543 /src/bin/eolian_mono/eolian/mono/utils.hh
parent9391407319424c503a78479b407737ccead945b7 (diff)
eolian_mono: Added code for eolian_mono generator
Based on the eolian_cxx library generators. Buildsystem files will come in a future commmit.
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/utils.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/utils.hh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/utils.hh b/src/bin/eolian_mono/eolian/mono/utils.hh
new file mode 100644
index 0000000000..3e48e518b5
--- /dev/null
+++ b/src/bin/eolian_mono/eolian/mono/utils.hh
@@ -0,0 +1,22 @@
1#ifndef EOLIAN_MONO_UTILS_HPP
2#define EOLIAN_MONO_UTILS_HPP
3
4#include <string>
5#include <algorithm>
6
7namespace eolian_mono { namespace utils {
8
9 // Helper method to avoid multiple as_generator calls when mixing case strings
10 std::string to_uppercase(std::string s)
11 {
12 std::transform(s.begin(), s.end(), s.begin(), ::toupper);
13 return s;
14 }
15 std::string to_lowercase(std::string s)
16 {
17 std::transform(s.begin(), s.end(), s.begin(), ::tolower);
18 return s;
19 }
20} }
21
22#endif