close a string