From 231a4c16b3dee47d026b6b176b01a9df1d43aa56 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 27 Jul 2012 12:06:08 +0200 Subject: Add support for case-insensitive regex --- cutl/re.hxx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'cutl/re.hxx') diff --git a/cutl/re.hxx b/cutl/re.hxx index 7638bb4..6bca3f5 100644 --- a/cutl/re.hxx +++ b/cutl/re.hxx @@ -66,15 +66,26 @@ namespace cutl ~basic_regex (); - basic_regex (): impl_ (0) {init (0);} + basic_regex (): impl_ (0) {init (0, false);} explicit - basic_regex (string_type const& s): impl_ (0) {init (&s);} + basic_regex (string_type const& s, bool icase = false) + : impl_ (0) + { + init (&s, icase); + } basic_regex& operator= (string_type const& s) { - init (&s); + init (&s, false); + return *this; + } + + basic_regex& + assign (string_type const& s, bool icase = false) + { + init (&s, icase); return *this; } @@ -104,7 +115,7 @@ namespace cutl private: void - init (string_type const*); + init (string_type const*, bool); private: struct impl; -- cgit v1.1