Thread overview | ||||||
---|---|---|---|---|---|---|
|
June 29, 2004 ctype.isspace missing characters | ||||
---|---|---|---|---|
| ||||
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. |
June 30, 2004 Re: ctype.isspace missing characters | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | 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. > > |
June 30, 2004 Re: ctype.isspace missing characters | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | 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/ |
June 30, 2004 Re: ctype.isspace missing characters | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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 |
Copyright © 1999-2021 by the D Language Foundation