kakoune/src/regex.cc

22 lines
326 B
C++
Raw Normal View History

#include "regex.hh"
namespace Kakoune
{
Regex::Regex(StringView re, RegexCompileFlags flags)
: m_impl{new CompiledRegex{compile_regex(re, flags)}},
m_str{re.str()}
2017-11-01 07:08:03 +01:00
{}
String option_to_string(const Regex& re)
{
2016-02-05 00:52:06 +01:00
return re.str();
}
void option_from_string(StringView str, Regex& re)
{
2015-07-25 12:15:03 +02:00
re = Regex{str};
}
}