|
Aegis
4.25.D505
|
#include <common/nstring.h>Go to the source code of this file.
Functions | |
| bool | is_a_locale_name (const nstring &text) |
| bool | is_a_language_name (const nstring &text) |
| bool | is_a_territory_name (const nstring &text) |
| bool is_a_language_name | ( | const nstring & | text | ) |
The is_a_language_name is used to test whether or not a string (usually part of a filename) looks like a valid localisation language name.
Lanugae names are defined by iso-639-3 as 2-letter or 3-letter codes, but in practice can be uglier, and sometimes even contain a variety of punctuation characters.
| text | The text string to be validated. |
| bool is_a_locale_name | ( | const nstring & | text | ) |
The is_a_locale_name is used to test whether or not a string (usually a filename component directory) looks like a valid localisation locale name.
Local names have the format
"{language} [ _ {territory} ][ . {charset} ][ '@' {qualifier} ]"
In theory {language} is a 2-letter or 3-letter language code from isoNNNN, but in practice can be uglier, and sometimes even contain "_.@" characters.
In theory {territory} is a 2-letter or 3-letter country code from isoNNNN, but in practice can be uglier, and sometimes even contain "_.@" characters.
| text | The text string to be validated. |
| bool is_a_territory_name | ( | const nstring & | text | ) |
The is_a_territory_name is used to test whether or not a string (usually part of a filename) looks like a valid localisation territory name.
Territory names are defined by iso-3166-2 as 2-letter or 3-letter codes, but in practice can be uglier, and sometimes even contain a variety of punctuation characters.
| text | The text string to be validated. |
1.7.6.1