Good question - I can think of one possibility - if the string is overloaded with multiple values - region, district, area (not good examples, I know), then there may be a desire to leave certain items in situ and swap others for some reason.

Which raises for me the thought that this is VERY specific to a local requirement and doesn't line up well for generalization. If the string were 'a1b2c3d', then by Gad's requirement, reversing alpha only would be 'd1c2b3a'.

Regards
Vern

On 12/19/2013 11:21 PM, John Yeung wrote:
On Thu, Dec 19, 2013 at 10:38 PM, Gad Miron <gadmiron@xxxxxxxxx> wrote:
I neglected to mention that there might be numbers embedded in the string,
The numbers needs to remain intact.
Given a 'ab123cd' string, a simple reverse will get me cd321ba
instead of dc123ba .
That is quite an unusual requirement. If I may ask, what do you need that for?

John


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.