Skip to content

Conversation

MIVerTFT
Copy link

@MIVerTFT MIVerTFT commented Jul 3, 2020

Splitting a string containing the Cyrillic symbols using the gmatch method has wrong result, for example:

                s = 'Ррррр Нннннн Сссссс'
                words = {}
                for word in s:gmatch('%w+') do table.insert(words, word) end
                return words

Returns a table containing one row, although the correct result is three rows.

Added a solution to this problem and a couple of tests. I didn't quite understand why in KopiLua when working with strings char is often cast to byte, causes there is a loss of information, which leads to such bugs.

Мальцев Илья Владимирович added 2 commits July 3, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant