refs #1052 : rewrite string-related function.