Skip to content

Commit 38d2429

Browse files
BurdetteLamarpeterzhu2118
authored andcommitted
[DOC] Multibyte chars Japanese only
1 parent a8c3d5e commit 38d2429

File tree

8 files changed

+0
-15
lines changed

8 files changed

+0
-15
lines changed

doc/string/aref.rdoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ returns the 1-character substring found in self at character offset index:
88
'hello'[0] # => "h"
99
'hello'[4] # => "o"
1010
'hello'[5] # => nil
11-
'Привет'[2] # => "и"
1211
'こんにちは'[4] # => "は"
1312

1413
With negative integer argument +index+ given,
@@ -92,7 +91,6 @@ returns the matching substring of +self+, if found:
9291
'hello'['ell'] # => "ell"
9392
'hello'[''] # => ""
9493
'hello'['nosuch'] # => nil
95-
'Привет'['ив'] # => "ив"
9694
'こんにちは'['んにち'] # => "んにち"
9795

9896
Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].

doc/string/aset.rdoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,6 @@ With string argument +substring+ given:
170170
s['ll'] = 'foo' # => "foo"
171171
s # => "hefooo"
172172

173-
s = 'Привет'
174-
s['ив'] = 'foo' # => "foo"
175-
s # => "Прfooет"
176-
177173
s = 'こんにちは'
178174
s['んにち'] = 'foo' # => "foo"
179175
s # => "こfooは"

doc/string/bytes.rdoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Returns an array of the bytes in +self+:
22

33
'hello'.bytes # => [104, 101, 108, 108, 111]
4-
'Привет'.bytes # => [208, 159, 209, 128, 208, 184, 208, 178, 208, 181, 209, 130]
54
'こんにちは'.bytes
65
# => [227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]
76

doc/string/bytesize.rdoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ Note that the byte count may be different from the character count (returned by
55
s = 'foo'
66
s.bytesize # => 3
77
s.size # => 3
8-
s = 'Привет'
9-
s.bytesize # => 12
10-
s.size # => 6
118
s = 'こんにちは'
129
s.bytesize # => 15
1310
s.size # => 5

doc/string/capitalize.rdoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Examples:
1010
'HELLO'.capitalize # => "Hello"
1111
'straße'.capitalize # => "Straße" # Lowercase 'ß' not changed.
1212
'STRAẞE'.capitalize # => "Straße" # Uppercase 'ẞ' downcased to 'ß'.
13-
'привет'.capitalize # => "Привет"
14-
'ПРИВЕТ'.capitalize # => "Привет"
1513

1614
Some characters (and some character sets) do not have upcase and downcase versions;
1715
see {Case Mapping}[rdoc-ref:case_mapping.rdoc]:

doc/string/center.rdoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ centered and padded on one or both ends with +pad_string+:
99
'hello'.center(20, '-|') # => "-|-|-|-hello-|-|-|-|" # Some padding repeated.
1010
'hello'.center(10, 'abcdefg') # => "abhelloabc" # Some padding not used.
1111
' hello '.center(13) # => " hello "
12-
'Привет'.center(10) # => " Привет "
1312
'こんにちは'.center(10) # => " こんにちは " # Multi-byte characters.
1413

1514
If +size+ is less than or equal to the size of +self+, returns an unpadded copy of +self+:

doc/string/chars.rdoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Returns an array of the characters in +self+:
22

33
'hello'.chars # => ["h", "e", "l", "l", "o"]
4-
'Привет'.chars # => ["П", "р", "и", "в", "е", "т"]
54
'こんにちは'.chars # => ["こ", "ん", "に", "ち", "は"]
65
''.chars # => []
76

doc/string/swapcase.rdoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Examples:
77

88
'Hello'.swapcase # => "hELLO"
99
'Straße'.swapcase # => "sTRASSE"
10-
'Привет'.swapcase # => "пРИВЕТ"
1110
'RubyGems.org'.swapcase # => "rUBYgEMS.ORG"
1211

1312
The sizes of +self+ and the upcased result may differ:

0 commit comments

Comments
 (0)