summaryrefslogtreecommitdiff
path: root/doc/string/index.rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/string/index.rdoc')
-rw-r--r--doc/string/index.rdoc6
1 files changed, 1 insertions, 5 deletions
diff --git a/doc/string/index.rdoc b/doc/string/index.rdoc
index cc34bc68e6..c3cff24dac 100644
--- a/doc/string/index.rdoc
+++ b/doc/string/index.rdoc
@@ -8,10 +8,9 @@ returns the index of the first matching substring in +self+:
'foo'.index('o') # => 1
'foo'.index('oo') # => 1
'foo'.index('ooo') # => nil
- 'тест'.index('с') # => 2 # Characters, not bytes.
'こんにちは'.index('ち') # => 3
-When +pattern is a Regexp, returns the index of the first match in +self+:
+When +pattern+ is a Regexp, returns the index of the first match in +self+:
'foo'.index(/o./) # => 1
'foo'.index(/.o/) # => 0
@@ -24,9 +23,6 @@ the returned index is relative to the beginning of +self+:
'bar'.index('r', 2) # => 2
'bar'.index('r', 3) # => nil
'bar'.index(/[r-z]/, 0) # => 2
- 'тест'.index('с', 1) # => 2
- 'тест'.index('с', 2) # => 2
- 'тест'.index('с', 3) # => nil # Offset in characters, not bytes.
'こんにちは'.index('ち', 2) # => 3
With negative integer argument +offset+, selects the search position by counting backward