From: Ramon F Herrera on 23 Jan 2010 06:03 The one facility I miss from Perl is 'split()'. What should I use to implement it in C++? My choices would be: - string operations such as .find() and .substr() and from there RYO. - something based on Boost::regex I need to break down a file path into its constituent subdirectories, and similar operations. Any other suggestions, comments? TIA, -Ramon RYO: Roll Your Own
From: Ronald Landheer-Cieslak on 24 Jan 2010 00:06 Ramon F Herrera wrote: > The one facility I miss from Perl is 'split()'. What should I use to > implement it in C++? > > My choices would be: > > - string operations such as .find() and .substr() and from there RYO. > > - something based on Boost::regex > > I need to break down a file path into its constituent subdirectories, > and similar operations. > > Any other suggestions, comments? http://www.boost.org/doc/libs/1_41_0/libs/tokenizer/index.html HTH rlc -- Ronald Landheer-Cieslak Software Development Professional http://landheer-cieslak.com http://vlinder.ca --- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: Jerry Coffin on 24 Jan 2010 23:56 In article <27a01af4-cda4-4221-909c-a79ee34a3096 @p8g2000yqb.googlegroups.com>, ramon(a)conexus.net says... > > The one facility I miss from Perl is 'split()'. What should I use to > implement it in C++? > > My choices would be: > > - string operations such as .find() and .substr() and from there RYO. > > - something based on Boost::regex > > I need to break down a file path into its constituent subdirectories, > and similar operations. Boost has a tokenizer and, specifically for file paths, there's also the Boost filesystem library. -- Later, Jerry.
From: gaus on 28 Jan 2010 06:43 On Jan 24, 8:56 pm, Jerry Coffin <jerryvcof...(a)yahoo.com> wrote: > In article <27a01af4-cda4-4221-909c-a79ee34a3096 > @p8g2000yqb.googlegroups.com>, ra...(a)conexus.net says... > > > > > The one facility I miss from Perl is 'split()'. What should I use to > > implement it in C++? > > > My choices would be: > > > - string operations such as .find() and .substr() and from there RYO.. > > > - something based on Boost::regex > > > I need to break down a file path into its constituent subdirectories, > > and similar operations. > > Boost has a tokenizer and, specifically for file paths, there's also > the Boost filesystem library. > > -- > Later, > Jerry. Yes I think u can use c api "SpiltPath" it will used to seperate file paths
From: Rui Maciel on 30 Jan 2010 20:54 Ramon F Herrera wrote: > The one facility I miss from Perl is 'split()'. What should I use to > implement it in C++? Does re2c suit your needs? Rui Maciel
|
Next
|
Last
Pages: 1 2 3 Prev: Few Questions Next: Can Someone please help me with my Computer stuff? 50194 |