S
S
Samarkand2017-08-27 19:27:03
ruby
Samarkand, 2017-08-27 19:27:03

How to make swapcase in Ruby 2.3 work with Cyrillic?

How to make swapcase in Ruby 2.3 work with Cyrillic?

s = 'Строка'
print s.swapcase

Does not change character case.
Maybe take a different version of Ruby?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
oh_shi, 2017-08-27
@Samarkand

1) ruby ​​2.4+
2) Rails => s.mb_chars.swapcase.to_s
3) gems like unicode_utils

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question