Re: Moving string - number conversions to string libs

2001-12-06 Thread Tom Hughes
In message [EMAIL PROTECTED] James Mastros [EMAIL PROTECTED] wrote: Right. Unfornatly, after starting on this, I relized that that's the easy part. Unicode has a fairly-well defined way of figuring out if a character is a digit (see if it's category is Nd (Number/digit), and if so

Re: Moving string - number conversions to string libs

2001-12-06 Thread Bart Lateur
On Thu, 06 Dec 2001 00:16:34 GMT, Tom Hughes wrote: So far I have added as is_digit() call to the character type layer to replace the existing isdigit() calls. There seems to be an overlap with the /\d/ character class in regexes. Can't you use the same test? Can't you use the definition of

Re: Moving string - number conversions to string libs

2001-12-06 Thread Jonathan Scott Duff
On Thu, Dec 06, 2001 at 02:17:31AM +, Alex Gough wrote: Also, for string - integer conversion I think we ought to be scanning for a float then turning the result into an integer (as 1234.56e2 is one). Does scanning for a float include 1234,56e2 or any other locale specific

Re: Moving string - number conversions to string libs

2001-12-05 Thread Tom Hughes
In message [EMAIL PROTECTED] James Mastros [EMAIL PROTECTED] wrote: On Mon, 3 Dec 2001, Tom Hughes wrote: It's completely wrong I would have thought - the encoding layer cannot know that a given code point is a digit so it can't possibly do string to number conversion. You

Re: Moving string - number conversions to string libs

2001-12-05 Thread Alex Gough
On Thu, 6 Dec 2001, Tom Hughes wrote: In message [EMAIL PROTECTED] James Mastros [EMAIL PROTECTED] wrote: On Mon, 3 Dec 2001, Tom Hughes wrote: It's completely wrong I would have thought - the encoding layer cannot know that a given code point is a digit so it can't possibly

Moving string - number conversions to string libs

2001-12-03 Thread Alex Gough
The string to number conversion stuff should really be done by the string encodings... I think this is the right way to get this happening, comments? Alex Gough Index: string.c === RCS file: /home/perlcvs/parrot/string.c,v

Re: Moving string - number conversions to string libs

2001-12-03 Thread Simon Cozens
On Mon, Dec 03, 2001 at 05:42:15PM +, Alex Gough wrote: The string to number conversion stuff should really be done by the string encodings... I think this is the right way to get this happening, comments? Looks like the right way to me. Could you commit it? I suppose this is the time to

Re: Moving string - number conversions to string libs

2001-12-03 Thread Alex Gough
On Mon, 3 Dec 2001, Simon Cozens wrote: On Mon, Dec 03, 2001 at 05:42:15PM +, Alex Gough wrote: The string to number conversion stuff should really be done by the string encodings... I think this is the right way to get this happening, comments? Looks like the right way to me. Could

Re: Moving string - number conversions to string libs

2001-12-03 Thread Tom Hughes
In message [EMAIL PROTECTED] Simon Cozens [EMAIL PROTECTED] wrote: On Mon, Dec 03, 2001 at 05:42:15PM +, Alex Gough wrote: The string to number conversion stuff should really be done by the string encodings... I think this is the right way to get this happening, comments?

Re: Moving string - number conversions to string libs

2001-12-03 Thread James Mastros
On Mon, 3 Dec 2001, Tom Hughes wrote: It's completely wrong I would have thought - the encoding layer cannot know that a given code point is a digit so it can't possibly do string to number conversion. You need to use the encoding layer to fetch each character and then the character set