home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 33,290 of 33,346   
   peter koch larsen to All   
   Re: Efficiently splitting strings -- sub   
   27 Feb 14 15:45:31   
   
   From: peter.koch.larsen@googlemail.com   
      
   Den torsdag den 27. februar 2014 15.01.32 UTC+1 skrev K. Frank:   
   > Hello Group!   
   >   
   > Is there any standard practice for efficiently   
   > splitting strings into tokens (and then further   
   > processing those tokens)?   
   >   
   > Specifically, I have a function that takes a   
   > std::string, splits it into white-space-separated   
   > (for example) tokens that it then returns in a   
   > std::vector.  This obviously entails   
   > some unnecessary copying and vector manipulations,   
   > but is convenient, and was quick for prototyping.   
   >   
      
   Boost has string_view and this is most probably just what you want.   
      
   Best regards   
   Peter   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca