Check if character is letter in Delphi (Unicode)

Miguel E picture Miguel E · Apr 10, 2012 · Viewed 9.6k times · Source

Are there pre-defined charsets in Delphi, to check if a character is a letter?

In Cocoa I use something like

if ([[NSCharacterSet whitespaceCharacterSet] characterIsMember:character])

I know I can do in Delphi

if c in ['A'..'Z'] then

but will this cover foreign accentuated characters like Á, À, Ú, É, ....?

What would be the most efficient way to check this in Delphi. I need to check if a string is fully composed with letters.

Answer

RRUZ picture RRUZ · Apr 10, 2012