0

I'm working on a task to search specific characters/string from Hebrew text using various **c# methods like IndexOf and Substring.**
But I'm facing an critical issue related to Bidirectional text, this issue occurred when Hebrew text/line start with English digits/Non-Hebrew characters.

To understand this problem please consider below example:

Hebrew text as Input - 724.79 <₪) סה״כ לתשלום
String/key for which index need to be find from above text - סה״כ לתשלום

Now, as per Hebrew's nature(Right-To-Left) index of search key should be 0. But, I found index other than 0 due to input text is Bidirectional text containing non-hebrew characters.

How to deal with this situation? Please help me in this regards.
Thank you

Michael Haddad
  • 4,085
  • 7
  • 42
  • 82
Piyush
  • 542
  • 1
  • 8
  • 17
  • Related: [In which order RTL language (Hebrew, Arabic, etc) strings are stored in memory?](https://stackoverflow.com/q/10630623/1220550) – Peter B Oct 29 '18 at 08:02
  • What exactly are you trying to achieve ? To get index with right-to-left order ? – Fabjan Oct 29 '18 at 08:04
  • @Fabjan, Yes exactly. I just want to find index of particular key from input Hebrew string as mentioned in example. – Piyush Oct 29 '18 at 08:55

0 Answers0