add strip tailing white characters support