diff options
Diffstat (limited to 'src/jsutil.hh')
| -rw-r--r-- | src/jsutil.hh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/jsutil.hh b/src/jsutil.hh new file mode 100644 index 0000000..ff9582e --- /dev/null +++ b/src/jsutil.hh @@ -0,0 +1,22 @@ +#ifndef JSUTIL_HH +#define JSUTIL_HH + +#include <string> +#include <string_view> + +namespace js { + +enum class QuoteChar { + SINGLE, + DOUBLE, +}; + + +std::string quote(std::string_view in, + QuoteChar quote_char = QuoteChar::DOUBLE); +void quote(std::string_view in, std::string& out, + QuoteChar quote_char = QuoteChar::DOUBLE); + +} // namespace js + +#endif // JSUTIL_HH |
