summaryrefslogtreecommitdiff
path: root/src/jsutil.hh
blob: ff9582ed73c9df8181d4ec0c036b2e03e083bb9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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