www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - ctype.isspace missing characters

reply Sean Kelly <sean f4.ca> writes:
isspace should evaluate true when the passed value is any of the following:

0x09 – 0x0D or 0x20

ie.

space (' '), form feed ('\f'), new-line ('\n'), carriage return ('\r'),
horizontal tab ('\t'), and vertical tab ('\v').

I think it just returns true for ' ' now.
Jun 29 2004
next sibling parent reply "Walter" <newshound digitalmars.com> writes:
I think it works, can you try again?

"Sean Kelly" <sean f4.ca> wrote in message
news:cbsued$a7f$1 digitaldaemon.com...
 isspace should evaluate true when the passed value is any of the
following:
 0x09 - 0x0D or 0x20

 ie.

 space (' '), form feed ('\f'), new-line ('\n'), carriage return ('\r'),
 horizontal tab ('\t'), and vertical tab ('\v').

 I think it just returns true for ' ' now.
Jun 29 2004
parent Sean Kelly <sean f4.ca> writes:
In article <cbt51h$j9q$2 digitaldaemon.com>, Walter says...
I think it works, can you try again?
It does work. I must have screwed up my test case. Sorry about that. Sean
Jun 30 2004
prev sibling parent J C Calvarese <jcc7 cox.net> writes:
Sean Kelly wrote:
 isspace should evaluate true when the passed value is any of the following:
 
 0x09 – 0x0D or 0x20
 
 ie.
 
 space (' '), form feed ('\f'), new-line ('\n'), carriage return ('\r'),
 horizontal tab ('\t'), and vertical tab ('\v').
 
 I think it just returns true for ' ' now.
This works for me (no asserts fail). Did I miss one? import std.ctype; void main() { assert(isspace(' ')); /* space */ assert(isspace('\r')); /* carriage return */ assert(isspace('\n')); /* new-line */ assert(isspace('\f')); /* form feed */ assert(isspace('\t')); /* horizontal tab */ assert(isspace('\v')); /* vertical tab */ assert(isspace('\x09')); assert(isspace('\x0A')); assert(isspace('\x0B')); assert(isspace('\x0C')); assert(isspace('\x0D')); assert(isspace('\x20')); assert(!isspace('j')); } -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Jun 29 2004