[Top][All Lists]

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

Re: [Chicken-hackers] substring

From: felix . winkelmann
Subject: Re: [Chicken-hackers] substring
Date: Fri, 26 Aug 2016 12:50:05 +0200

> Hello all,
> Sjamaan and Mario on the channel brought up an interesting issue with
> substring=?. The current semantics check only to the length of the
> shorter string, so:
> (and (substring=? "foo" "foobar") (substring=? "foobar" "foo")) => #t
> I submit that this behaviour is conceptually broken.

It depends on the point of view. SRFI-13 does (according to my reading)
perform string comparison only on the given range (string=). The
MIT Scheme docs don't go into specifics, other's I couldn't find right now.

> substring is an instance of a subset operation, and

A string is an ordered collection, not a set.


reply via email to

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