bleroy / lunr-core

A port of LUNR.js to .NET Core
MIT License
558 stars 24 forks source link

Eliminate string allocation in IsLunrSeparator #49

Closed iamcarbon closed 2 years ago

iamcarbon commented 2 years ago

Spotted one more allocation we can kill.

the "\s" pattern calls IsWhiteSpace, so we're still matching the same whitespace characters.

See: https://github.com/dotnet/runtime/pull/714/files