My C skills must be getting rusty: I had never heard of this string function: strfry!

via: Worse Than Failure» 3 reactions

Comments

[gravatar]
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.

[gravatar]
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.

[gravatar]
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:

name
email
Ignore this:
not displayed and no spam.
Leave this empty:
www
not searched.
 
Name and either email or www are required.
Don't put anything here:
Leave this empty:
URLs auto-link and some tags are allowed: <a><b><i><p><br><pre>.