Avoid using deprecated String functions.