Skip to content

Use .IndexOf(char/byte) where possible #9539

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

Merged
merged 1 commit into from
Apr 22, 2019

Conversation

benaadams
Copy link
Member

@benaadams benaadams commented Apr 19, 2019

As its faster. Also string.IndexOf(string) is by default CurrentCulture so its much faster than that.

Follow up to #9537

FormPipeReader goes a bit ugly using the ternaries

/cc @GrabYourPitchforks for more spice

@rynowak
Copy link
Member

rynowak commented Apr 19, 2019

:shipit: from me on the routing change. Someone else should take a look at the form reader part :)

@benaadams
Copy link
Member Author

Someone else should take a look at the form reader part :)

I think I'm going to back that out as its too ugly; and the current version shouldn't be too bad, even if its doing extra work.

@benaadams
Copy link
Member Author

K, dropped the Formreader change

@Eilon Eilon added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer labels Apr 19, 2019
@Tratcher Tratcher self-assigned this Apr 19, 2019
@jkotalik jkotalik closed this Apr 19, 2019
@jkotalik jkotalik reopened this Apr 19, 2019
@benaadams benaadams closed this Apr 20, 2019
@benaadams benaadams reopened this Apr 20, 2019
@benaadams benaadams closed this Apr 21, 2019
@benaadams benaadams reopened this Apr 21, 2019
@analogrelay
Copy link
Contributor

Looks nice and safe to me. I'll merge now for preview 5.

@analogrelay analogrelay added this to the 3.0.0-preview5 milestone Apr 22, 2019
@analogrelay analogrelay merged commit 48c97b4 into dotnet:master Apr 22, 2019
@benaadams benaadams deleted the IndexOf-2 branch April 22, 2019 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants