From 3eac7857feedde38683be0a7aeda0f90211e8dc1 Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Thu, 24 Nov 2011 15:33:42 +0100 Subject: [PATCH] New function tr(). --- RELEASE_NOTES | 6 ++++++ VERSION | 2 +- mpsl_f.c | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 81cf3f3..a16a396 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,6 +1,12 @@ MPSL Release Notes ================== +2.0.2 +----- + + - New features: + - New function tr(), to transliterate strings. + 2.0.1 ----- diff --git a/VERSION b/VERSION index 7f364e8..81c9b7a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -#define VERSION "2.0.1" +#define VERSION "2.0.2-dev" diff --git a/mpsl_f.c b/mpsl_f.c index 313ed31..1b6c4d0 100644 --- a/mpsl_f.c +++ b/mpsl_f.c @@ -1374,6 +1374,23 @@ static mpdm_t F_semaphore_post(F_ARGS) } +/** + * tr - Transliterates a string. + * @str: the string + * @from: set of characters to be replaced + * @to: set of characters to replace + * + * Transliterates @str to a new string with all characters from @from + * replaced by those in @to. + * [Threading] + */ +/** tr(str, from, to); */ +static mpdm_t F_tr(F_ARGS) +{ + return mpdm_tr(A0, A1, A2); +} + + static struct { wchar_t *name; mpdm_t(*func) (mpdm_t, mpdm_t); @@ -1449,6 +1466,7 @@ static struct { { L"semaphore", F_semaphore }, { L"semaphore_wait", F_semaphore_wait }, { L"semaphore_post", F_semaphore_post }, + { L"tr", F_tr }, { NULL, NULL } }; -- 2.11.4.GIT