[DOC] Russian strings should look Russian

This commit is contained in:
BurdetteLamar 2025-12-16 23:21:14 +00:00 committed by Peter Zhu
parent d0b72429a9
commit 99b915944f
Notes: git 2025-12-18 22:47:44 +00:00
5 changed files with 10 additions and 10 deletions

View File

@ -170,9 +170,9 @@ With string argument +substring+ given:
s['ll'] = 'foo' # => "foo"
s # => "hefooo"
s = 'тест'
s['ес'] = 'foo' # => "foo"
s # => "тfooт"
s = 'Привет'
s['ив'] = 'foo' # => "foo"
s # => "Прfooет"
s = 'こんにちは'
s['んにち'] = 'foo' # => "foo"

View File

@ -1,7 +1,7 @@
Returns an array of the bytes in +self+:
'hello'.bytes # => [104, 101, 108, 108, 111]
'тест'.bytes # => [209, 130, 208, 181, 209, 129, 209, 130]
'hello'.bytes # => [104, 101, 108, 108, 111]
'Привет'.bytes # => [208, 159, 209, 128, 208, 184, 208, 178, 208, 181, 209, 130]
'こんにちは'.bytes
# => [227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]

View File

@ -5,9 +5,9 @@ Note that the byte count may be different from the character count (returned by
s = 'foo'
s.bytesize # => 3
s.size # => 3
s = 'тест'
s.bytesize # => 8
s.size # => 4
s = 'Привет'
s.bytesize # => 12
s.size # => 6
s = 'こんにちは'
s.bytesize # => 15
s.size # => 5

View File

@ -9,7 +9,7 @@ centered and padded on one or both ends with +pad_string+:
'hello'.center(20, '-|') # => "-|-|-|-hello-|-|-|-|" # Some padding repeated.
'hello'.center(10, 'abcdefg') # => "abhelloabc" # Some padding not used.
' hello '.center(13) # => " hello "
'тест'.center(10) # => " тест "
'Привет'.center(10) # => " Привет "
'こんにちは'.center(10) # => " こんにちは " # Multi-byte characters.
If +size+ is less than or equal to the size of +self+, returns an unpadded copy of +self+:

View File

@ -1,7 +1,7 @@
Returns an array of the characters in +self+:
'hello'.chars # => ["h", "e", "l", "l", "o"]
'тест'.chars # => ["т", "е", "с", "т"]
'Привет'.chars # => ["П", "р", "и", "в", "е", "т"]
'こんにちは'.chars # => ["こ", "ん", "に", "ち", "は"]
''.chars # => []