krasa / StringManipulation

IntelliJ plugin - https://plugins.jetbrains.com/plugin/2162
Apache License 2.0
694 stars 81 forks source link

Feature request: Evaluate arithmetic expression #95

Open jaredkhan opened 4 years ago

jaredkhan commented 4 years ago

For each caret: Take the entire selection as a string or the current line if no selection Strip out all whitespace from that string Evaluate that string as an arithmetic expression (supporting + - * / ( and )) if the evaluation succeeds replace the caret selection (or the line if no selection) with the numeric result of the evaluation

krasa commented 4 years ago

It seems you already done it https://github.com/jaredkhan/IntelliJEvaluateArithmetic