Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/auxiliary')
-rw-r--r--src/auxiliary/functions.cc9
-rw-r--r--src/auxiliary/functions.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/auxiliary/functions.cc b/src/auxiliary/functions.cc
index 860524a..8cefbc5 100644
--- a/src/auxiliary/functions.cc
+++ b/src/auxiliary/functions.cc
@@ -165,4 +165,13 @@ void to_label(std::string &text)
}
}
+void strip_quotes(std::string &text)
+{
+ for (size_t pos = 0; pos < text.size(); pos++) {
+ if (text[pos] == '"') {
+ text[pos] = '\'';
+ }
+ }
+}
+
}
diff --git a/src/auxiliary/functions.h b/src/auxiliary/functions.h
index fccb4dc..d5b590d 100644
--- a/src/auxiliary/functions.h
+++ b/src/auxiliary/functions.h
@@ -55,6 +55,9 @@ const std::string text_strip_lowercase(const std::string &text);
/// trim leading ad trailing spaces from a string
void trim(std::string &text);
+/// replaces double quotes by single quotes
+void strip_quotes(std::string &text);
+
/// convert a string to a valid label string
/** trim leading and trealing spaces, convert remaining spaces to underscores, and make lowercase
* remove any non-alphanumeric character