Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Algorithm for "Incrementing" strings

by sundialsvc4 (Abbot)
on Feb 12, 2015 at 02:53 UTC ( [id://1116429]=note: print w/replies, xml ) Need Help??


in reply to Algorithm for "Incrementing" strings

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^2: Algorithm for "Incrementing" strings
by Your Mother (Archbishop) on Feb 12, 2015 at 07:14 UTC

    I would also like to see a “Unicode aware” sequence routine with tests such that one could “have confidence that it actually worked.”

Re^2: Algorithm for "Incrementing" strings
by BrowserUk (Patriarch) on Feb 12, 2015 at 07:03 UTC
    Instead, I would use a recursive function which, given a string s an index n, and a dictionary d of characters in collating-sequence, would seek to “increment” the character at position n. This function, if given an index n that is less than the leftmost position of s, would simply return s. If it found that it had “wrapped-around” the character at position n, would recursively call itself with n = n-1. I would write such a routine to be “Unicode aware,” and I would have confidence that it actually worked.

    Go on then, do it. Show us. Any language you like. Show us.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1116429]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-24 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found