Rewriting String Function in C.