Afficher un message
Vieux 07/12/2007, 19h59   #8
Diwa
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Is this code to find an int in a string okay ?

On Dec 7, 11:18 am, James Kanze <james.ka...@gmail.com> wrote:
> On Dec 6, 3:51 pm, Diwa <shettydiwa...@gmail.com> wrote:
>
> > Is there any better way than below to find an int in a string
> > (e.g. "30" in "KFStat30A")

>
> boost::regex.
>
> If for some reason, you can't use Boost (most people probably
> can't), then beg, borrow or steal some other regular expression
> class. You don't want to do anything with text without one.
>


Thanks. That was what I originally wanted to use since we are using
boost anyway in our code. But later we decided against it since we do
not require any regex parsing except for this one. Boost regex would
have been an overkill especially considering the fact that boost regex
requires its library to be linked to the app. (If I am not wrong)
  Réponse avec citation
 
Page generated in 0,04969 seconds with 9 queries