git Branch --list ' hotfix '返回分支名称中包含单词 'hotfix' 的分支列表,而 git for-each-ref --format='%(authorname)' ' hotfix '不返回任何内容,甚至不返回/n符号
下面的方法产生意外的输出:
public static void Main(string[] args)
{
var dict = new Dictionary<int, string>()
{
{ 2, "0000 0000 0000 0000 0000 0000 0000 0010".Replace(" ", "") },
{ 0, "0000 0000 0000 0000 0000 0000 0000 0000".Replace(" ", "") },
{ 7529548, "0000 0000 ?0111 0010 1110 0100 0100 1100?".Replace(" ", "") }
};
foreach(var pair in dict)
{
Console.WriteLine(pair.Value.Length);
}
Console.ReadKey();
}
Run Code Online (Sandbox Code Playgroud)
输出为: 32、32、34
如果我使用编译器设置,它也不会改变。
为什么会发生这种情况?为什么在最后一种情况下字符串长度可能不同?