Functions | |
| template<typename T> | |
| void | range_check (const T value, const T min, const T max) |
| void | rfc3339_date_check (const std::string &value) |
| void | rfc3339_time_check (const std::string &value) |
| void | rfc3339_date_time_check (const std::string &value) |
| bool | is_ascii (std::string const &value) |
| void | rfc3986_uri_check (const std::string &value) |
Variables | |
| const std::string | decOctet {R"((?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]))"} |
| const std::string | ipv4Address {"(?:" + decOctet + R"(\.){3})" + decOctet} |
| const std::string | h16 {R"([0-9A-Fa-f]{1,4})"} |
| const std::string | h16Left {"(?:" + h16 + ":)"} |
| const std::string | ipv6Address |
| const std::string | ipvFuture {R"([Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&'()*+,;=:]+)"} |
| const std::string | regName {R"((?:[A-Za-z0-9\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*)"} |
| const std::string | host |
| const std::string | uuid {R"([0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12})"} |
| const std::string | hostname {R"(^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$)"} |
Many of the RegExes are from
| bool anonymous_namespace{string-format-check.cpp}::is_ascii | ( | std::string const & | value | ) |
Definition at line 195 of file string-format-check.cpp.
Referenced by nlohmann::json_schema::default_string_format_check().
| void anonymous_namespace{string-format-check.cpp}::range_check | ( | const T | value, |
| const T | min, | ||
| const T | max ) |
Definition at line 31 of file string-format-check.cpp.
Referenced by rfc3339_date_check(), and rfc3339_time_check().
| void anonymous_namespace{string-format-check.cpp}::rfc3339_date_check | ( | const std::string & | value | ) |
Definition at line 41 of file string-format-check.cpp.
References range_check().
Referenced by nlohmann::json_schema::default_string_format_check(), and rfc3339_date_time_check().
| void anonymous_namespace{string-format-check.cpp}::rfc3339_date_time_check | ( | const std::string & | value | ) |
* date-fullyear = 4DIGIT
* date-month = 2DIGIT ; 01-12
* date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
* ; month/year
* time-hour = 2DIGIT ; 00-23
* time-minute = 2DIGIT ; 00-59
* time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second
* ; rules
* time-secfrac = "." 1*DIGIT
* time-numoffset = ("+" / "-") time-hour ":" time-minute
* time-offset = "Z" / time-numoffset
*
* partial-time = time-hour ":" time-minute ":" time-second
* [time-secfrac]
* full-date = date-fullyear "-" date-month "-" date-mday
* full-time = partial-time time-offset
*
* date-time = full-date "T" full-time
* NOTE: Per [ABNF] and ISO8601, the "T" and "Z" characters in this syntax may alternatively be lower case "t" or "z" respectively.
Definition at line 142 of file string-format-check.cpp.
References rfc3339_date_check(), and rfc3339_time_check().
Referenced by nlohmann::json_schema::default_string_format_check().
| void anonymous_namespace{string-format-check.cpp}::rfc3339_time_check | ( | const std::string & | value | ) |
Definition at line 67 of file string-format-check.cpp.
References range_check().
Referenced by nlohmann::json_schema::default_string_format_check(), and rfc3339_date_time_check().
| void anonymous_namespace{string-format-check.cpp}::rfc3986_uri_check | ( | const std::string & | value | ) |
* URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
*
* hier-part = "//" authority path-abempty
* / path-absolute
* / path-rootless
* / path-empty
*
* URI-reference = URI / relative-ref
*
* absolute-URI = scheme ":" hier-part [ "?" query ]
*
* relative-ref = relative-part [ "?" query ] [ "#" fragment ]
*
* relative-part = "//" authority path-abempty
* / path-absolute
* / path-noscheme
* / path-empty
*
* scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
*
* authority = [ userinfo "@" ] host [ ":" port ]
* userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
* host = IP-literal / IPv4address / reg-name
* port = *DIGIT
*
* IP-literal = "[" ( IPv6address / IPvFuture ) "]"
*
* IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
*
* IPv6address = 6( h16 ":" ) ls32
* / "::" 5( h16 ":" ) ls32
* / [ h16 ] "::" 4( h16 ":" ) ls32
* / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
* / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
* / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
* / [ *4( h16 ":" ) h16 ] "::" ls32
* / [ *5( h16 ":" ) h16 ] "::" h16
* / [ *6( h16 ":" ) h16 ] "::"
*
* h16 = 1*4HEXDIG
* ls32 = ( h16 ":" h16 ) / IPv4address
* IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
* dec-octet = DIGIT ; 0-9
* / %x31-39 DIGIT ; 10-99
* / "1" 2DIGIT ; 100-199
* / "2" %x30-34 DIGIT ; 200-249
* / "25" %x30-35 ; 250-255
*
* reg-name = *( unreserved / pct-encoded / sub-delims )
*
* path = path-abempty ; begins with "/" or is empty
* / path-absolute ; begins with "/" but not "//"
* / path-noscheme ; begins with a non-colon segment
* / path-rootless ; begins with a segment
* / path-empty ; zero characters
*
* path-abempty = *( "/" segment )
* path-absolute = "/" [ segment-nz *( "/" segment ) ]
* path-noscheme = segment-nz-nc *( "/" segment )
* path-rootless = segment-nz *( "/" segment )
* path-empty = 0<pchar>
*
* segment = *pchar
* segment-nz = 1*pchar
* segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
* ; non-zero-length segment without any colon ":"
*
* pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
*
* query = *( pchar / "/" / "?" )
*
* fragment = *( pchar / "/" / "?" )
*
* pct-encoded = "%" HEXDIG HEXDIG
*
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
* reserved = gen-delims / sub-delims
* gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
* / "*" / "+" / "," / ";" / "="
*
* Definition at line 294 of file string-format-check.cpp.
Referenced by nlohmann::json_schema::default_string_format_check().
| const std::string anonymous_namespace{string-format-check.cpp}::decOctet {R"((?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]))"} |
Definition at line 155 of file string-format-check.cpp.
| const std::string anonymous_namespace{string-format-check.cpp}::h16 {R"([0-9A-Fa-f]{1,4})"} |
Definition at line 157 of file string-format-check.cpp.
| const std::string anonymous_namespace{string-format-check.cpp}::h16Left {"(?:" + h16 + ":)"} |
Definition at line 158 of file string-format-check.cpp.
| const std::string anonymous_namespace{string-format-check.cpp}::host |
Definition at line 182 of file string-format-check.cpp.
| const std::string anonymous_namespace{string-format-check.cpp}::hostname {R"(^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$)"} |
Definition at line 193 of file string-format-check.cpp.
Referenced by nlohmann::json_schema::default_string_format_check().
| const std::string anonymous_namespace{string-format-check.cpp}::ipv4Address {"(?:" + decOctet + R"(\.){3})" + decOctet} |
Definition at line 156 of file string-format-check.cpp.
Referenced by nlohmann::json_schema::default_string_format_check().
| const std::string anonymous_namespace{string-format-check.cpp}::ipv6Address |
Definition at line 159 of file string-format-check.cpp.
Referenced by nlohmann::json_schema::default_string_format_check().
| const std::string anonymous_namespace{string-format-check.cpp}::ipvFuture {R"([Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&'()*+,;=:]+)"} |
Definition at line 180 of file string-format-check.cpp.
| const std::string anonymous_namespace{string-format-check.cpp}::regName {R"((?:[A-Za-z0-9\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*)"} |
Definition at line 181 of file string-format-check.cpp.
| const std::string anonymous_namespace{string-format-check.cpp}::uuid {R"([0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12})"} |
Definition at line 190 of file string-format-check.cpp.
Referenced by nlohmann::json_schema::default_string_format_check().