mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
[DOC] Better multibyte-character data
This commit is contained in:
parent
734dab5ec8
commit
bbef73b2ff
Notes:
git
2025-12-18 19:57:38 +00:00
@ -8,7 +8,7 @@ returns the 1-character substring found in self at character offset index:
|
||||
'hello'[0] # => "h"
|
||||
'hello'[4] # => "o"
|
||||
'hello'[5] # => nil
|
||||
'тест'[2] # => "с"
|
||||
'Привет'[2] # => "и"
|
||||
'こんにちは'[4] # => "は"
|
||||
|
||||
With negative integer argument +index+ given,
|
||||
@ -92,7 +92,7 @@ returns the matching substring of +self+, if found:
|
||||
'hello'['ell'] # => "ell"
|
||||
'hello'[''] # => ""
|
||||
'hello'['nosuch'] # => nil
|
||||
'тест'['ес'] # => "ес"
|
||||
'Привет'['ив'] # => "ив"
|
||||
'こんにちは'['んにち'] # => "んにち"
|
||||
|
||||
Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user