fix string replace bug

fix string replace bug that forrowing code cause infinity loop.
```
"".replace("", "")
```