DCSIMG
C#,string - Shimmy on .NET

Browse by Tags

All Tags » C# » string (RSS)

Determine if char is Hebrew (2) by Shimmy

About 2 weeks ago I posted a function that determines whether a given char is hebrew: // 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 ; } Schabse Laks commented that it won't include punctuation marks / vowels etc. This week I needed a more sophisticated function that does the job, so I ended up with the...
תגים:, , , , ,

Determine if char is Hebrew by Shimmy

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...
תגים:, , , , ,
Powered by Community Server (Commercial Edition), by Telligent Systems