Home > other >  c# Keep order in concatenated Hebrew strings
c# Keep order in concatenated Hebrew strings

Time:04-18

I have three strings, string1 is in Hebrew, string2 is an underscore, and string3 is in Hebrew again.

When I concatenate them using String.Concat(string1, string2, string3), the resulting string is string3_string1 (the two Hebrew strings are inverted). I cannot find a workaround, see screenshot for real example.

Note that I do not know what language the strings are in, so I cannot test and change the concatenation accordingly, and I need them in the order I concatenate them.

Anyone can suggest a solution?

Thank you.

enter image description here

CodePudding user response:

The result string is actually string1_string3, it just prints from right to left.

  • Related