summaryrefslogtreecommitdiff
path: root/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.cpp')
-rw-r--r--src/utils.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/utils.cpp b/src/utils.cpp
index d7351425..9b50a492 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -78,14 +78,7 @@ void append_escapes(std::string& str, char c)
std::string utils::strip_comments(const std::string& line)
{
- /*
- * This functions returns only the non-comment part of the line,
- * which can then be safely evaluated and tokenized.
- *
- * If no comments are present on the line, the whole line is returned.
- */
- auto hash_pos = line.find_first_of("#");
- return line.substr(0, hash_pos);
+ return RustString(rs_strip_comments(line.c_str()));
}
std::vector<std::string> utils::tokenize_quoted(const std::string& str,