bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getLineStart:end:contentsEnd:forRange: fails on blank lines


From: Pete French
Subject: getLineStart:end:contentsEnd:forRange: fails on blank lines
Date: Sat, 03 Aug 2002 21:33:30 +0100

Found a problem in the above method of NSString. If you have a string
which contains blank lines - i.e. the sequence \n\n somewhere in it - then
if you specify a range being the single '\n' character on the
line, then the method returs a range containing the whole of the following
ine, rather than just the blank line itself.

The upshot is that if you setpping through a file to break it
into lines using the start cgaracter of a line and a length of 1 in
your range (to get the range for each line) then you end up with
blank line sskipped, and non-blank lines with a spurious '\n' at the start.

I havent been able to find and fix the bug as yet unfortunately, but I
have verified that the behaviour is different to OSX (not tries on OS42
as yet).

-bat.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]