File: libc.info, Node: strfry, Next: Trivial Encryption, Prev: Finding Tokens in a String, Up: String and Array Utilities 5.9 strfry ========== The function below addresses the perennial programming quandary: "How do I take good data in string form and painlessly turn it into garbage?" This is actually a fairly simple task for C programmers who do not use the GNU C Library string functions, but for programs based on the GNU C Library, the 'strfry' function is the preferred method for destroying string data. The prototype for this function is in 'string.h'. -- Function: char * strfry (char *STRING) Preliminary: | MT-Safe | AS-Safe | AC-Safe | *Note POSIX Safety Concepts::. 'strfry' creates a pseudorandom anagram of a string, replacing the input with the anagram in place. For each position in the string, 'strfry' swaps it with a position in the string selected at random (from a uniform distribution). The two positions may be the same. The return value of 'strfry' is always STRING. *Portability Note:* This function is unique to the GNU C Library.
Generated by $Id: phpMan.php,v 4.55 2007/09/05 04:42:51 chedong Exp $ Author: Che Dong
On Apache/2.4.6 (CentOS)
Under GNU General Public License
2024-12-21 17:16 @127.0.0.1 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)