How to easily remove leading characters from a string, such as a space, tab or newline, etc. and also at the end? My user enters a string using the console, but he can enter spaces, tabs, newlines, etc. and then the program breaks down.

  • You put a string in std :: string. There look towards find_first_not_of, find_last_of - Yury Melnikov
  • one
    ::boost::trim_left(str); ::boost::trim_right(str); - VTT
  • one
    @ jeremy228 well, probably because you need to connect it .. - Andrej Levkovitch
  • one
    Connecting the boost pulls up a separate question ... - VTT
  • one

0