string space and empty string replacement