I am trying to add integer to Arabic string but no success
// Arabic String
Astr = "سُوْرَةُ الْفَاتِحَة";
// String with Integer -1
num = "-"+1;
// Adding Strings
r = Astr + num;
r = num + Astr;
output : سُوْرَةُ الْفَاتِحَة-1
Desired output:
سُوْرَةُ الْفَاتِحَة-1
I want the integer on the right side .
Update : Am displaying this result in ListBox
in visual studio by using Items.Insert()
Method , so if anyone know to tweak ListBox then kindly share I mean if ListBox
display Numbers 1 2 3 4 with each row ?
Use Unicode LRM (200F)
string Astr = "سُوْرَةُ الْفَاتِحَة";
var num = "-1";
var LRM = ((char)0x200E).ToString();
var result = Astr + LRM + num;
and you will get: result = "سُوْرَةُ الْفَاتِحَة-1"
See: HOW TO: Formatting Control Characters
LRM ==> Left-to-Right Mark ==> 200E ==> Acts as a Latin character.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With