DCSIMG
Determine if char is Hebrew - Shimmy on .NET

Determine if char is Hebrew

Simple Ex. method:

// avoid unicode chars in code
private const char FirstHebChar = (char)1488; //א
private const char LastHebChar = (char)1514; //ת 
private static bool IsHebrew(this char c)
{
  return c >= FirstHebChar && c <= LastHebChar;
}
Note: a comment bellow noted that the above function solely checks for hebrew characters within the א-ת range,
it won't include punctuation marks, vowels or other biblical symbols.
For a function that covers all (all that I'm aware of) Hebrew characters, please refer here.
Published Thursday, January 19, 2012 12:38 AM by Shimmy
תגים:, , , , , ,

Comments

# re: Determine if char is Hebrew

Tuesday, January 31, 2012 4:01 AM by SLaks

   return c >= 'א' && c <= 'ת';

Note that this doesn't include נקודות or the combined forms with דגשים

# Determine if char is Hebrew (2)

Friday, February 03, 2012 3:01 AM by Shimmy on .NET

About 2 weeks ago I posted a function to determine whether a given char is hebrew: // avoid unicode chars

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above:
Powered by Community Server (Commercial Edition), by Telligent Systems