[tarantool-patches] Re: [PATCH 2/7] lua: implement string.u_count
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Thu Apr 26 19:07:02 MSK 2018
Removed unused enum value.
diff --git a/src/util.c b/src/util.c
index 24dfe11ce..582fd69b0 100644
--- a/src/util.c
+++ b/src/util.c
@@ -329,10 +329,6 @@ enum u_count_class {
U_COUNT_CLASS_LOWER_LETTER = 2,
U_COUNT_CLASS_TITLE_LETTER = 4,
U_COUNT_CLASS_DIGIT = 8,
-
- U_COUNT_LETTER = U_COUNT_CLASS_UPPER_LETTER |
- U_COUNT_CLASS_LOWER_LETTER |
- U_COUNT_CLASS_TITLE_LETTER,
};
On 26/04/2018 02:29, Vladislav Shpilevoy wrote:
> Lua can not calculate length of a unicode string correctly. But
> Tarantool has ICU on board - lets use it to calculate length.
>
> u_count has options, that allows to count only symbols of a
> specific class, for example, only capital letters, or digits.
> Options can be combined.
>
> Closes #3081
> ---
> extra/exports | 1 +
> src/CMakeLists.txt | 1 +
> src/lua/string.lua | 52 ++++++++++++++++++++++++++++++++++++++++++++
> src/util.c | 48 +++++++++++++++++++++++++++++++++++++++-
> test/app-tap/string.test.lua | 22 ++++++++++++++++++-
> 5 files changed, 122 insertions(+), 2 deletions(-)
>
More information about the Tarantool-patches
mailing list