adding next min number of char to add to remove white space from a string