diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-22 11:41:03 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-22 11:41:03 +0300 |
commit | 1d876b1360a9be46570360beb0bd8138557ff0da (patch) | |
tree | b8bc50e53b0cb3b084b77b97a7268122b564281b /libbutl/project-name.cxx | |
parent | 20615c2161fb491e4c87b0cc8483c2e600ae6f79 (diff) |
Make use of sanitize_identifier()
Diffstat (limited to 'libbutl/project-name.cxx')
-rw-r--r-- | libbutl/project-name.cxx | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/libbutl/project-name.cxx b/libbutl/project-name.cxx index 4c04e5f..a1767e9 100644 --- a/libbutl/project-name.cxx +++ b/libbutl/project-name.cxx @@ -10,8 +10,7 @@ #include <string> #include <vector> #include <utility> // move() -#include <iterator> // back_inserter -#include <algorithm> // find(), transform() +#include <algorithm> // find() #include <stdexcept> // invalid_argument #endif @@ -103,19 +102,4 @@ namespace butl size_t p (path::traits_type::find_extension (value_)); return p != string::npos ? string (value_, p + 1) : string (); } - - string project_name:: - variable () const - { - using std::string; - - auto sanitize = [] (char c) - { - return (c == '-' || c == '+' || c == '.') ? '_' : c; - }; - - string r; - transform (value_.begin (), value_.end (), back_inserter (r), sanitize); - return r; - } } |