Replaced deprecated string functions.

Replaced strcat with string and strchr with search.