using string::empty() for judge whether string is empty.