Replaced use of strcat and strchr.

Replaced strcat with string and strchr with search.