[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: newline comparison?
Chris Uzdavinis wrote:
>
>
> Here's the situation: I have a string whose value is a single newline
> character. (The variable name is 'line'.) I want to ask in a
> (cond...) statement the question "is this string equal to the string
> containing just a newline?"
>
> ...
>
> There must be something I'm overlooking, but this seems ridiculously
> difficult or maybe just underdocumented. None of the above tests
> work, and I'm kind of unsure how to figure this out.
Actually, I think the problem is that read-line doesn't return the
newline as part of the string. This is documented in the MzScheme
language manual, under System Utilities / Ports / Reading and Printing.
Joe