From 979d9509c1c2ad0922f81c196f1dfce4fefd0537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sun, 12 Jun 2016 22:12:43 +0200 Subject: [PATCH] Added function for escaping ASP variables. --- include/plasp/utils/IO.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/plasp/utils/IO.h b/include/plasp/utils/IO.h index d2d022e..75005f7 100644 --- a/include/plasp/utils/IO.h +++ b/include/plasp/utils/IO.h @@ -40,6 +40,17 @@ inline std::string unescapeASP(const std::string &string) //////////////////////////////////////////////////////////////////////////////////////////////////// +inline std::string escapeASPVariable(const std::string &string) +{ + auto escaped = escapeASP(string); + + escaped.front() = std::toupper(escaped.front()); + + return escaped; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + } }