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

Update string split to use Tokenize instead #351

Closed
kamronbatman opened this issue Dec 15, 2020 · 0 comments · Fixed by #354
Closed

Update string split to use Tokenize instead #351

kamronbatman opened this issue Dec 15, 2020 · 0 comments · Fixed by #354
Labels
enhancement New feature or request

Comments

@kamronbatman
Copy link
Contributor

Use Tokenize from the HighPerf nuget:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.toolkit.highperformance.extensions.stringextensions.tokenize?view=win-comm-toolkit-dotnet-stable

This will eliminate all allocations by using a slice of the original string.

@kamronbatman kamronbatman added the enhancement New feature or request label Dec 15, 2020
kamronbatman added a commit that referenced this issue Dec 21, 2020
- [X] Removes some string allocations (e.g. split)
- [X] Optimizes some collections
- [X] Converts insensitive to extension methods of built-ins.
- [X] Adds ordinal (case sensitive) string helpers
- [X] Fixes conditionals for in-game commands so they use Ordinal comparisons.
- [X] Replaces ToLower.Contains with InsensitiveContains
- [X] Adds ValueStringBuilder
- [X] Implements ValueStringBuilder in a few places where it makes sense
- [X] Removes the redundant Wrap function and replaces it with an optimized version
- [X] Fixes list conversions in Utility

Closes #351

Bumps release version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant