From c029d90d1975e124d237605f1edb2be16bd05b5d Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Tue, 28 Feb 2017 21:50:44 +0100 Subject: Initial commit --- src/strings.hh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/strings.hh (limited to 'src/strings.hh') diff --git a/src/strings.hh b/src/strings.hh new file mode 100644 index 0000000..10e3edf --- /dev/null +++ b/src/strings.hh @@ -0,0 +1,24 @@ +// -*- mode: c++; c-basic-offset: 2; -*- + +#ifndef STRINGS_HH +#define STRINGS_HH + +#include + +class Strings { +public: + static void trim(std::string const& str, size_t* start, size_t* end); + static std::string trim(std::string const& str); + static std::string trim(std::string const& str, size_t start, size_t end); + + static std::string quote(std::string const& str); + static std::string quote(std::string const& str, size_t start, size_t end); + static std::string unquote(std::string const& str); + static std::string unquote(std::string const& str, size_t start, size_t end); + +private: + ~Strings() {} + Strings() {} +}; + +#endif // STRINGS_HH -- cgit v1.2.3-70-g09d2