Added String function to javascript file.