For this purpose the expression evaluator can be used.
This article may be helpful to you
math / function / boolean /string expression evaluator[
^]
From the following paragraph of the above article
"Thus, I've developed a set of simple classes called ExpressionEval and FunctionEval. These evaluators handle numeric, string, boolean, and datetime datatypes, and they support all the unary and binary operators available in C#. They also support functions (through the utilization of FunctionEval class) and have the ability to add custom functions by attaching an event handler that fires when a function name is not found."
it can be seen that strings can be handled.