Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

string IndexOf work differently for windows and linux #10689

Closed
ichensky opened this issue Jul 16, 2018 · 1 comment
Closed

string IndexOf work differently for windows and linux #10689

ichensky opened this issue Jul 16, 2018 · 1 comment

Comments

@ichensky
Copy link
Contributor

.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
Copy link
Contributor Author

move issue to corefx

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant