string.Trim, TrimLeft, TrimRight optimizations

And removed a few stray characters in string.Explode & Replace
Escaped Trim/TrimLeft/TrimRight special chars
Merge pull request #717 from Divran/patch-1

string.Trim, TrimLeft, TrimRight optimizations