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

assert(!`alpha`.isProperNameCapitalized);
assert(!`alpha centauri`.isProperNameCapitalized);
assert(!`ALPHA`.isProperNameCapitalized);
assert(!`ALPHA CENTAURI`.isProperNameCapitalized);
assert(!`aThing`.isProperNameCapitalized);
assert(`Alpha`.isProperNameCapitalized);
assert(`Alpha Centauri`.isProperNameCapitalized);
assert(`11104 Airion`.isProperNameCapitalized);
assert(`New York City`.isProperNameCapitalized);
assert(`1-Hexanol`.isProperNameCapitalized);
assert(`11-Hexanol`.isProperNameCapitalized);
assert(`22nd Army`.isProperNameCapitalized);
assert(!`22nd army`.isProperNameCapitalized);
assert(`2nd World War`.isProperNameCapitalized);
assert(`Second World War`.isProperNameCapitalized);
assert(`Värmland`.isProperNameCapitalized);
assert(!`The big sky`.isProperNameCapitalized);
assert(`Suur-London`.isProperNameCapitalized);
assert(`Kingdom of Sweden`.isProperNameCapitalized);
assert(`Stratford upon Avon`.isProperNameCapitalized);
assert(`Henry II`.isProperNameCapitalized);

Meta