Seemingly identical strings fail comparison

前端 未结 4 614
星月不相逢
星月不相逢 2021-01-18 01:50

I am encountering a strange issue while comparing two strings. Here is my code:

console.log(x == y);
console.log(\"\'\" + x + \"\'==\'\" + y + \"\'\");
conso         


        
4条回答
  •  萌比男神i
    2021-01-18 02:20

    If you are trying to do it in c# this might have to do something with Normalization. FormC vs FormD vs FormKC vs FormKD Reference : http://sharepoint.asia/two-exactly-same-strings-fail-while-comparison-in-c-net/

提交回复
热议问题