开发者

How to concatenate two unicode characters in DotNet and not have any space?

When I concatenate the following two unicode characters I see both but there is a space between them. Is there anyway to get rid of this space?

 StringBuilder  sb = new StringBuilder();
 int characterCode;
 characterCode = Convert.ToInt32("2758", 16);
 sb.Append((char)characterC开发者_StackOverflow中文版ode);
 characterCode = Convert.ToInt32("25c4", 16);
 sb.Append((char)characterCode);


If you examine sb, you will see that it has Length of 2. There is no space between the characters.

I think the issue is that you wish the "on" pixels of the 2 characters were closer to each other so the 2 "characters" look more "next to" each other, no?

Edit: Like you said, you can see if those 2 characters look any "closer" to each other in a different font.


Would not

  var str = "\x2758\x25c4"

work?


There's no space, it's an artifact of your display font.


Character U+2758 looks very wide in MS Gothic, but it's narrow in Arial Unicode MS. Try changing your font.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜