Completed the string calculator