Nate 5:03 PM on 20 Apr 2007

Wait, the introduction to that page is misleading. They say "turn it into garbage" and "destroying string data", except it's not garbage, it's just an anagram... it just randomly swaps the characters around inside the string. Now, that in itself is not useless, but the comments on the function are really really misleading. From the description, I was expecting the contents of the string to be entirely replaced by psuedorandom data.

Should be renamed strscramble.

Jay Parlar 5:10 PM on 20 Apr 2007

Just program a large app that pushes around lots of C strings, they'll get scrambled up sooner or later.

Richard Jones 7:19 PM on 22 Apr 2007

Well, I also thought maybe I was getting rusty by not knowing it -- but then I read the bit that said it's specific to the GNU C library. I'm comfortable that my C knowledge ain't that rusty now :)

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
URLs auto-link and some tags are allowed: <a><b><i><p><br><pre>.