From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D73A721E66 for ; Thu, 26 Apr 2018 12:07:05 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MxIjH3FZakBF for ; Thu, 26 Apr 2018 12:07:05 -0400 (EDT) Received: from smtp44.i.mail.ru (smtp44.i.mail.ru [94.100.177.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 9806D21E5C for ; Thu, 26 Apr 2018 12:07:05 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 2/7] lua: implement string.u_count From: Vladislav Shpilevoy References: Message-ID: <19384f27-a45d-022d-7afc-1b1afb7cf719@tarantool.org> Date: Thu, 26 Apr 2018 19:07:02 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: kostja@tarantool.org 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(-) >