Add methods to remove leading or trailing whitespaces or both.