updated strip space

strip space no longer uses a loop. Instead uses alogrithms and built-in
string functions