Add span-based Version methods
authorStephen Toub <stoub@microsoft.com>
Thu, 17 Aug 2017 13:33:26 +0000 (09:33 -0400)
committerStephen Toub <stoub@microsoft.com>
Thu, 17 Aug 2017 13:33:39 +0000 (09:33 -0400)
commit76e315f9c6fe75220ab2083dce304f251c41cb17
tree9d2e4cfbec0c69f7b679e8855fec161ffacccc62
parentb95e25c2332273a6f37442e92b041a3c6b21308d
Add span-based Version methods

The span-based {Try}Parse is allocation-free, and as the string-based {Try}Parse uses it, it's also now allocation-free, rather than allocating a string[] from a split and a string for each component in the version.

Commit migrated from https://github.com/dotnet/coreclr/commit/b2e3b1b0317dc48daab2d40d5911e28be42937fa
src/coreclr/src/mscorlib/shared/System/StringSpanHelpers.cs
src/coreclr/src/mscorlib/shared/System/Version.cs