by golergka · 10y ago · 0 comments
> isCapital("שלום");
true
> isCapital("1");
true
> isCapital('\uD83D\uDE00'); // Smiling emoji
true
> isCapital(\u279B); // Right-facing arrow
true
> isCapital("\u061Casd"); //Bidirectional control character
true
> isCapital(" ");
true
Actually, it just means that if you're wondering "if this word starts with a capital", you're asking a wrong question. Instead, you should be asking "if this word is a valid generic name", or "is this word a start of a new sentence", and implement these semantic queries in a language-specific way.