trimStrings function in PBTools.
write by Aline!