Replacing String objects with C strings