Re: Feature Proposal: Allow letter decrementing

From: Date: Fri, 19 Jul 2013 09:31:15 +0000
Subject: Re: Feature Proposal: Allow letter decrementing
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-68191@lists.php.net to get a copy of this message
On 19 July 2013 11:18, Dan Cryer <dan@dancryer.com> wrote: > What's the intended use case for string increment / decrement? > > Personally, I instantly think of mirroring spreadsheet columns - works quite well in that context. > It just seems like madness to me, using mathematical operators with > strings, producing seemingly arbitrary results in some circumstances (C -> > B -> A -> NULL / False ?). > > Throw a warning and don't decrement A/a any further - that's not arbitrary. > Also what happens in other languages? Take for example German, in which ß > comes after S, Ü after U, and so on. > > Nothing, works purely on ascii, as is currently the case. Perl handles other character sets though - see the link I posted for details on how. Regards Peter -- <hype> WWW: plphp.dk / plind.dk CV: careers.stackoverflow.com/peterlind LinkedIn: plind Twitter: kafe15 </hype>

« previous php.internals (#68191) next »