optimize string operations a bit
Merge pull request #402 from emdete/remove_poormans_tostring

optimize string operations a bit