digitalmars.D.bugs - ctype.isspace missing characters
- Sean Kelly (6/6) Jun 29 2004 isspace should evaluate true when the passed value is any of the followi...
- Walter (4/10) Jun 29 2004 I think it works, can you try again?
- Sean Kelly (3/4) Jun 30 2004 It does work. I must have screwed up my test case. Sorry about that.
- J C Calvarese (22/32) Jun 29 2004 This works for me (no asserts fail). Did I miss one?
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
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 thefollowing: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
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
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









Sean Kelly <sean f4.ca> 