isCapitalized

Check if s has proper noun capitalization.

That is, s starts with a capital letter followed by only lower letters.

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

Examples

assert(!``.isCapitalized);
assert(!`alpha`.isCapitalized);
assert(!`ALPHA`.isCapitalized);
assert(!`aThing`.isCapitalized);
assert(`Alpha`.isCapitalized);
assert(!`Jack London`.isCapitalized);

Meta