在开始中将整数插入阿拉伯字符串 [英] Insert integer to Arabic String in Start
本文介绍了在开始中将整数插入阿拉伯字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将整数添加到阿拉伯字符串,但没有成功
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;
输出:سُوْرَةُ الْفَاتِحَة-1
所需的输出:
سُوْرَةُ الْفَاتِحَة-1
我想要右边的整数.
更新:正在使用Items.Insert()
方法在Visual Studio的ListBox
中显示此结果,因此,如果有人知道要调整ListBox,然后好好分享我的意思是ListBox
每行显示数字1 2 3 4吗?/p>
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 ?
推荐答案
使用Unicode LRM (200F)
Use Unicode LRM (200F)
string Astr = "سُوْرَةُ الْفَاتِحَة";
var num = "-1";
var LRM = ((char)0x200E).ToString();
var result = Astr + LRM + num;
,您将获得:result = "سُوْرَةُ الْفَاتِحَة-1"
请参阅:如何:格式化控制字符
LRM ==>左至右标记==> 200E ==>充当拉丁字符.
LRM ==> Left-to-Right Mark ==> 200E ==> Acts as a Latin character.
这篇关于在开始中将整数插入阿拉伯字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文