runtime icon indicating copy to clipboard operation
runtime copied to clipboard

string IndexOf work differently for windows and linux

Open ichensky opened this issue 8 years ago • 1 comments

.net core 2.1

windows 10 x64: 
"some \n string".IndexOf("\n")        | result 5
"some \r\n string".IndexOf("\n")      | result 6
"some \r\n string".IndexOf('\n')      | result 6
"some \n string".IndexOf('\n')        | result 5

linux ubuntu x64: 
"some \n string".IndexOf("\n")        | result 5
"some \r\n string".IndexOf("\n")      |-> result -1
"some \r\n string".IndexOf('\n')      | result 6
"some \n string".IndexOf('\n')        | result 5

ichensky avatar Jul 16 '18 18:07 ichensky

move issue to corefx

ichensky avatar Jul 16 '18 18:07 ichensky