isProperNameCapitalized

Return true if s has proper name capitalization, such as in "Africa" or "South Africa".

bool
isProperNameCapitalized
(
S
)
(
S s
)
if (
isSomeString!S
)

Examples

1 assert(!`alpha`.isProperNameCapitalized);
2 assert(!`alpha centauri`.isProperNameCapitalized);
3 assert(!`ALPHA`.isProperNameCapitalized);
4 assert(!`ALPHA CENTAURI`.isProperNameCapitalized);
5 assert(!`aThing`.isProperNameCapitalized);
6 assert(`Alpha`.isProperNameCapitalized);
7 assert(`Alpha Centauri`.isProperNameCapitalized);
8 assert(`11104 Airion`.isProperNameCapitalized);
9 assert(`New York City`.isProperNameCapitalized);
10 assert(`1-Hexanol`.isProperNameCapitalized);
11 assert(`11-Hexanol`.isProperNameCapitalized);
12 assert(`22nd Army`.isProperNameCapitalized);
13 assert(!`22nd army`.isProperNameCapitalized);
14 assert(`2nd World War`.isProperNameCapitalized);
15 assert(`Second World War`.isProperNameCapitalized);
16 assert(`Värmland`.isProperNameCapitalized);
17 assert(!`The big sky`.isProperNameCapitalized);
18 assert(`Suur-London`.isProperNameCapitalized);
19 assert(`Kingdom of Sweden`.isProperNameCapitalized);
20 assert(`Stratford upon Avon`.isProperNameCapitalized);
21 assert(`Henry II`.isProperNameCapitalized);

Meta