I'm using 'string.Format' to manipulate text and creating columns
string.Format("{0, -4}{1, -16}{2, 11}\n", "#", "Name", "Price")
and result in English and LTR format is correct:
# Name Price
--- ------- --------
1 Product1 234440
2 Product2 34455
when I change languages and use arabic characters, the columns alignment display is not correct:
# نام قیمت
--- ------- --------
1 محصول ۲ ۳۴۲۳۴
2 محصول ۳ ۴۵۳۴۵۳
I use \u200E and \u200F also, but result did not changes.
my desired column display is:
نام قیمت #
----- ------- ---
محصول۱ ۱۲۲۲۳ #
محصول۲ ۲۲۳۳ #
Is there any way to solve this problem?
Please use following code sample. Second series that are based on
baseStr2
works as you desired.