StringCalculator cloned from Hap2000