Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to concatenate an English string with Arabic string

string followUpFormula = "FIF";
string renewAbbreviation =  "?.?" ;
string abbreviation = followUpFormula +"-"+ renewAbbreviation;
var result = 10 + "/" + abbreviation + "/" + 2016;

the result is 10/FIF-?.?/2016 but i want to display them like this: 10/FIF-?.?/
2016

how can I do that? thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
633 views
Welcome To Ask or Share your Answers For Others

1 Answer

Couple of additions to your code

string followUpFormula = "FIF";
string renewAbbreviation =  "?.?" ;
string abbreviation = followUpFormula +"-"+ renewAbbreviation;
var lefttoright = ((Char)0x200E).ToString();
var result = 10 + "/" + abbreviation + lefttoright + "/" + 2016;

Char 0x200E is a special character that tells the following text to read left to right see here for more information on the character.

Char 0x200F switches to a right to left format.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...