From 8b2e5ea862c748e13fbfd49ee3a00c8918d3ee10 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 31 May 2018 20:59:21 +1000 Subject: Make selection lists use the option list syntax --- src/string_utils.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/string_utils.hh') diff --git a/src/string_utils.hh b/src/string_utils.hh index bd803536..61a28cad 100644 --- a/src/string_utils.hh +++ b/src/string_utils.hh @@ -128,6 +128,11 @@ StringView format_to(ArrayView buffer, StringView fmt, Types&&... params) return format_to(buffer, fmt, ArrayView{detail::format_param(std::forward(params))...}); } +inline String quote(StringView s) +{ + return format("'{}'", replace(s, "'", "''")); +} + } #endif // string_utils_hh_INCLUDED -- cgit v1.2.3