Adding a helper function that translates single characters in a string.

This commit is contained in:
Tobias Brunner
2010-03-08 15:34:38 +01:00
parent d14203b009
commit d543d9cadf
3 changed files with 32 additions and 19 deletions
+8
View File
@@ -310,6 +310,14 @@ void memxor(u_int8_t dest[], u_int8_t src[], size_t n);
*/
void *memstr(const void *haystack, const char *needle, size_t n);
/**
* Translates the characters in the given string, searching for characters
* in 'from' and mapping them to characters in 'to'.
* The two characters sets 'from' and 'to' must contain the same number of
* characters.
*/
char *translate(char *str, const char *from, const char *to);
/**
* Creates a directory and all required parent directories.
*