Replace Utf16Utility.GetPointerToFirstInvalidChar fallback with Vector128 (#90391)
authorStephen Toub <stoub@microsoft.com>
Fri, 11 Aug 2023 16:56:30 +0000 (12:56 -0400)
committerGitHub <noreply@github.com>
Fri, 11 Aug 2023 16:56:30 +0000 (12:56 -0400)
commit2d6421b72d4272c131cf3dc025b84e75e57ae7bd
tree1ca7d2df61cc5e5ac2f7ec4a805c6842d2588ccc
parent08f0dc8e451b6d7aabda3a301af79d7c9df2ebe4
Replace Utf16Utility.GetPointerToFirstInvalidChar fallback with Vector128 (#90391)

* Replace Utf16Utility.GetPointerToFirstInvalidChar fallback with Vector128

The else block will only be used on platforms where `Vector<T>` is 128-bit, so just use Vector128 explicitly.

* Address PR feedback
src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs