![]() |
NDEVR
API Documentation
|
Logic for validating a string given a specific regex pattern. More...
Static Public Member Functions | |
| static bool | checkRegex (const StringView &string, const StringView ®ex, uint04 start_index=0, uint04 end_index=Constant< uint04 >::Invalid, uint04 max_size=256) |
| Checks whether a substring of the given string matches the specified regex pattern. | |
| template<class t_type> | |
| static bool | isValid (const StringView &string) |
| Checks whether the given string is valid for the specified type using its associated regex. | |
| static bool | isValid (const StringView &string, const TypeInfo &type) |
| Checks whether the given string is valid for the specified TypeInfo using its associated regex. | |
| template<class t_type> | |
| static const char * | regex () |
| Retrieves the validation regex pattern string for the specified type. | |
| static const char * | regex (const TypeInfo &type) |
| Retrieves the validation regex pattern string for the specified TypeInfo. | |
Logic for validating a string given a specific regex pattern.
Provides static utility methods to check whether a string matches a regular expression, with support for both compile-time type-based and runtime TypeInfo-based validation.
Definition at line 46 of file StringValidator.h.
|
static |
Checks whether a substring of the given string matches the specified regex pattern.
| [in] | string | The string to validate. |
| [in] | regex | The regex pattern to match against. |
| [in] | start_index | The starting character index within the string. |
| [in] | end_index | The ending character index within the string. Invalid means the full remaining length. |
| [in] | max_size | The maximum allowed size of the string for validation. |
References regex().
|
inlinestatic |
Checks whether the given string is valid for the specified type using its associated regex.
| [in] | string | The string to validate. |
Definition at line 66 of file StringValidator.h.
References regex().
|
inlinestatic |
Checks whether the given string is valid for the specified TypeInfo using its associated regex.
| [in] | string | The string to validate. |
| [in] | type | The TypeInfo describing the expected format. |
Definition at line 77 of file StringValidator.h.
|
inlinestatic |
Retrieves the validation regex pattern string for the specified type.
Definition at line 87 of file StringValidator.h.
References StringStream< t_type >::getValidRegex().
Referenced by checkRegex(), isValid(), and isValid().
|
static |