|
From: | Alex Shinn |
Subject: | Re: [Chicken-hackers] Bug in SRFI 13 string-skip-right (was: fix for string-trim-right) |
Date: | Thu, 23 Jan 2014 21:54:01 +0900 |
Alex Shinn scripsit:
> > (string-skip-right "abc " char-whitespace? 4 4) => 2
> >
> > The correct result is #f; Riastradh confirmed that the correct semantics
> > throughout SRFI 13 for start-end is that they are conceptually applied
> > using substring/shared before anything else is done.
> >
> > A quick look at the reference implementation suggests that it needs
> > to trap the case where start = end, and always return #f then.
>
> Shouldn't it return ""?
No, you're confusing string-skip-right (the subject of this bug) with
string-trim-right (the subject of the previous bug).
The former returns an index or #f [...]
[Prev in Thread] | Current Thread | [Next in Thread] |