Simplified some functions in tstring.cpp by replacing with standard func...

...tions.