222_Ret_opt_valid_
StrPattern* _strPatternCreate(_In_opt_ strref pat, flags_t flags);
238#define strPatternCreate(pat, ...) _strPatternCreate(pat, opt_flags(__VA_ARGS__))
246bool _strPatternMatch(_In_
StrPattern* pat, _In_opt_ strref s,
int n, _In_
stvp* dests);
264#define strPatternMatch(pat, s, ...) \
265 _strPatternMatch(pat, s, count_macro_args(__VA_ARGS__), (stvp[]) { __VA_ARGS__ })
268bool _strPatternMatchAt(_Inout_ int32* io_pos, _In_
StrPattern* pat, _In_opt_ strref s,
int n,
285#define strPatternMatchAt(io_pos, pat, s, ...) \
286 _strPatternMatchAt(io_pos, pat, s, count_macro_args(__VA_ARGS__), (stvp[]) { __VA_ARGS__ })
289bool _strParse(_In_opt_ strref s, _In_opt_ strref pat,
int n, _In_
stvp* dests);
309#define strParse(s, pat, ...) \
310 _strParse(s, pat, count_macro_args(__VA_ARGS__), (stvp[]) { __VA_ARGS__ })
331#define _STR_PATTERN_DECL(name, cname, patstr, patflags) \
332 STR_CONSTRL(cname, patstr); \
333 static StrPatternDecl name = { _SR(cname), (patflags) }
356#define STR_PATTERN(name, patstr, ...) \
357 _STR_PATTERN_DECL(name, _strpat_##name, patstr, opt_flags(__VA_ARGS__))
366#define strPat(name) _strPatGet(&name)
PARSEVarFlags
Parse variable flags for Parsable interface implementations.
@ PARSEVar_CaseInsensitive
the pattern was compiled case-insensitive
@ PARSEVar_Trim
the trim option was given
@ PARSEVar_Lower
the lower option was given
@ PARSEVar_Upper
the upper option was given
struct StrPattern StrPattern
STRPAT_FLAGS
Flags controlling how a pattern is compiled and matched.
void strPatternDestroy(StrPattern **pat)
@ STRPAT_CaseI
Literal text matches without regard to case.
@ STRPAT_ExactWS
Whitespace in the pattern matches exactly, not a run.
Thread-safe lazy initialization.
Dynamic arrays with type-safe generic programming.
Copy-on-write strings with automatic memory management and rope optimization.
State tracker for lazy initialization.
Parse variable descriptor for Parsable interface implementations.
string def
Default text, if the placeholder had one.
flags_t flags
PARSEVarFlags.
sa_string opts
Parse options the pattern gave that the object must interpret.
LazyInitState state
Guards the one-time compile.
StrPattern * compiled
The compiled pattern, once there is one.
struct StrPatternDecl * next
Links every compiled pattern off a global root.
flags_t flags
STRPAT_FLAGS.
Variant type containers and type-safe variadic argument support.