Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
RegularExpression.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
6
7 /*
8 ********************************************************************************
9 ********************** Characters::RegularExpression ***************************
10 ********************************************************************************
11 */
13 : fCompiledRegExp_{}
14 {
15 }
16 inline RegularExpression::RegularExpression (const wregex& regEx)
17 : fCompiledRegExp_{regEx}
18 {
19 }
20 inline RegularExpression::RegularExpression (wregex&& regEx)
21 : fCompiledRegExp_{move (regEx)}
22 {
23 }
24 inline RegularExpression::RegularExpression (const String& re, CompareOptions co)
25 : RegularExpression{SyntaxType::eDEFAULT, re, co}
26 {
27 }
28 inline const wregex& RegularExpression::GetCompiled () const
29 {
30 return fCompiledRegExp_;
31 }
32
33 /*
34 ********************************************************************************
35 *********************** Literals::operator "" _RegEx ***************************
36 ********************************************************************************
37 */
38 inline namespace Literals {
39 inline RegularExpression operator"" _RegEx (const char* str, size_t len)
40 {
41 return RegularExpression{String::FromStringConstant (span{str, len})};
42 }
43 inline RegularExpression operator"" _RegEx (const wchar_t* str, size_t len)
44 {
45 return RegularExpression{String{span{str, len}}};
46 }
47 inline RegularExpression operator"" _RegEx (const char8_t* str, size_t len)
48 {
49 return RegularExpression{String{span{str, len}}};
50 }
51 inline RegularExpression operator"" _RegEx (const char16_t* str, size_t len)
52 {
53 return RegularExpression{String{span{str, len}}};
54 }
55 inline RegularExpression operator"" _RegEx (const char32_t* str, size_t len)
56 {
57 return RegularExpression{String{span{str, len}}};
58 }
59 }
60
61}
static String FromStringConstant(const CHAR_T(&cString)[SIZE])
Take the given argument data (constant span) - which must remain unchanged - constant - for the appli...
Definition String.inl:386