davedelong / DDMathParser

String → Number
MIT License
854 stars 153 forks source link

Replacing a default operator with a custom operator, or another default operator #176

Open tanish2k09 opened 4 years ago

tanish2k09 commented 4 years ago

First of all, thanks for the amazing library!

I'm trying to make an app that requires the ^ symbol to be defined as the exponent symbol so that 3 ^ 2 is 9, but the default operator ^ is defined as XOR.

The docs have content about creating custom operators and even operator aliases, but it doesn't say anything about being able to override the default operators completely. Is there a way to define ^ as exponent instead of **?