perl-unicode

Re: should \d match *all* the digits?

1999-08-11 10:49:06
Nick Ing-Simmons writes:
: Daniel Yacob <dmulholl(_at_)cs(_dot_)indiana(_dot_)edu> writes:
: >> on \d+ and feed it to atoi() meaningfully?
: >
: >I seem to remember atoi as "ASCII-to-Integer" but my man pages are not 
: >confirming this.  ANSI C would certainly choke on a UTF8 string in this case.
: 
: Which is why you need the 'tr' in Larry's version.

I was using that to specify semantics, not to suggest that we force users
to do tr/// themselves.  But yes, bare atoi() would certainly choke on
non-ASCII.

Larry

<Prev in Thread] Current Thread [Next in Thread>