Re: Feature Proposal: Allow letter decrementing
| From: | Ralf Lang | Date: | Fri, 19 Jul 2013 16:14:56 +0000 |
| Subject: | Re: Feature Proposal: Allow letter decrementing | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-68205@lists.php.net to get a copy of this message | ||
>>>> What's the intended use case for string increment / decrement?
>>>>
>>>>
>>> Personally, I instantly think of mirroring spreadsheet columns - works
>>> quite well in that context.
>>>
>>
>> ++/-- 'XYZ00001234' would have use cases.
I once had an app which needed to generate long continuous ranges of
alpha codes. But even then I did not implement -- in PHP userland.
I think if there is a need for --, each application would need its own
"correct" behaviour. AAA-- may be AA or ZZ or ZZZ or ZZ0 or ZZ9 or even
0ZZ depending on use case.
If there is a reason to do this in C rather than PHP userland code, it's
probably best fit in an extension.
--
Ralf Lang
Linux Consultant / Developer
Tel.: +49-170-6381563
Mail: lang@b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc