matheval / expression-evaluator-c-sharp

Matheval is a mathematical expressions evaluator library written in C#. Allows to evaluate mathematical, boolean, string and datetime expressions
https://matheval.org/
MIT License
110 stars 30 forks source link

Feature/replace regex #10

Open nastymorbol opened 1 year ago

nastymorbol commented 1 year ago

Replaced some Regex with constant expressions for performance improvement.

s-michael-telford commented 1 year ago

I considered making similar changes, but was going to recommend using the built it char static functions instead. Specifically, char.IsAsciiDigit or char.IsDigit, char.IsAsciiLetter or char.IsLetter etc.

nastymorbol commented 1 year ago

Since the static char functions are unicode, i prefer to work with explicit ASCII characters. Unfortunately, I already had problems where my customers used some unicode characters using copy paste, which I then misinterpreted.