a simple str utility with C implemtantion