在Start中将整数插入阿拉伯字符串

我试图将整数添加到阿拉伯字符串但没有成功

// Arabic String Astr = "سُوْرَةُ الْفَاتِحَة"; // String with Integer -1 num = "-"+1; // Adding Strings r = Astr + num; r = num + Astr; 

输出: سُوْرَةُ الْفَاتِحَة-1

期望的输出:

 سُوْرَةُ الْفَاتِحَة‎-1 

我想要右侧的整数。

更新:我在Visual Studio中通过使用Items.Insert()方法在ListBox中显示此结果,所以如果有人知道调整ListBox然后亲切分享我的意思是如果ListBox显示每行1 2 3 4的数字?

使用Unicode LRM (200F)

 string Astr = "سُوْرَةُ الْفَاتِحَة"; var num = "-1"; var LRM = ((char)0x200E).ToString(); var result = Astr + LRM + num; 

你会得到: result = "سُوْرَةُ الْفَاتِحَة‎-1"

请参阅: 如何:格式化控制字符

LRM ==>从左到右标记==> 200E ==>用作拉丁字符。

Interesting Posts