replace_first completed and tested. mingw 4.7.2 passed
TODO: replace of new_str which is longer than old_str