Recognizers-Text icon indicating copy to clipboard operation
Recognizers-Text copied to clipboard

[* DateTime V2] Refactor Timex parsing code to use Spans instead of Strings

Open aitelint opened this issue 3 years ago • 1 comments

Replace String manipulation operations in TImexUtility with more efficient Span manipulation operations.

For example: var subStr = inputStr.Substring(start, length); --> var subSpan = inputSpan.Slice(start, length);

aitelint avatar May 16 '22 04:05 aitelint

@tellarin, I left a comment in #2950 about this.

It seems that parsing of spans is not supported in .NET Framework, so the span needs to be converted back to string when passing it to int.TryParse. Should we still proceed? Or do you have other suggestions?

aitelint avatar Jun 15 '22 09:06 aitelint