diff options
author | Tobias Brunner <tobias@strongswan.org> | 2010-03-08 15:26:09 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2010-03-08 15:34:38 +0100 |
commit | d543d9cadfd69c01eff883cb2bab927d6a3c1564 (patch) | |
tree | e0fcd2a17db2388a0a79dab92a3218fe67d88d66 /src/libstrongswan/utils.h | |
parent | d14203b00954e828883fed0ddcc890d1ff1e02fd (diff) | |
download | strongswan-d543d9cadfd69c01eff883cb2bab927d6a3c1564.tar.bz2 strongswan-d543d9cadfd69c01eff883cb2bab927d6a3c1564.tar.xz |
Adding a helper function that translates single characters in a string.
Diffstat (limited to 'src/libstrongswan/utils.h')
-rw-r--r-- | src/libstrongswan/utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstrongswan/utils.h b/src/libstrongswan/utils.h index d3500258f..607d077f7 100644 --- a/src/libstrongswan/utils.h +++ b/src/libstrongswan/utils.h @@ -311,6 +311,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. * * @param path path to the new directory |