summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBurdette Lamar <BurdetteLamar@Yahoo.com>2025-12-28 14:51:10 -0600
committerGitHub <noreply@github.com>2025-12-28 15:51:10 -0500
commitd615dbf4e28d26c3fd7a54ad58d7365521378599 (patch)
treef89c72a542833044bda23336899379259f5ca5f8 /doc
parent44e762a99c2234756594382f36fc64db1d6c31d0 (diff)
[DOC] Japanese for multi-byte characters
Diffstat (limited to 'doc')
-rw-r--r--doc/language/character_selectors.rdoc1
-rw-r--r--doc/matchdata/begin.rdoc12
-rw-r--r--doc/matchdata/bytebegin.rdoc12
-rw-r--r--doc/matchdata/byteend.rdoc12
-rw-r--r--doc/matchdata/end.rdoc12
-rw-r--r--doc/matchdata/offset.rdoc12
6 files changed, 30 insertions, 31 deletions
diff --git a/doc/language/character_selectors.rdoc b/doc/language/character_selectors.rdoc
index 20685b8392..8bfc9b719b 100644
--- a/doc/language/character_selectors.rdoc
+++ b/doc/language/character_selectors.rdoc
@@ -31,7 +31,6 @@ contained in the selector itself:
'abracadabra'.delete('abc') # => "rdr"
'0123456789'.delete('258') # => "0134679"
'!@#$%&*()_+'.delete('+&#') # => "!@$%*()_"
- 'тест'.delete('т') # => "ес"
'こんにちは'.delete('に') # => "こんちは"
Note that order and repetitions do not matter:
diff --git a/doc/matchdata/begin.rdoc b/doc/matchdata/begin.rdoc
index 8046dd9d55..6100617e19 100644
--- a/doc/matchdata/begin.rdoc
+++ b/doc/matchdata/begin.rdoc
@@ -10,12 +10,12 @@ returns the offset of the beginning of the <tt>n</tt>th match:
m[3] # => "113"
m.begin(3) # => 3
- m = /(т)(е)(с)/.match('тест')
- # => #<MatchData "тес" 1:"т" 2:"е" 3:"с">
- m[0] # => "тес"
- m.begin(0) # => 0
- m[3] # => "с"
- m.begin(3) # => 2
+ m = /(ん)(に)(ち)/.match('こんにちは')
+ # => #<MatchData "んにち" 1:"ん" 2:"に" 3:"ち">
+ m[0] # => "んにち"
+ m.begin(0) # => 1
+ m[3] # => "ち"
+ m.begin(3) # => 3
When string or symbol argument +name+ is given,
returns the offset of the beginning for the named match:
diff --git a/doc/matchdata/bytebegin.rdoc b/doc/matchdata/bytebegin.rdoc
index 5b40a7ef73..54e417a7fc 100644
--- a/doc/matchdata/bytebegin.rdoc
+++ b/doc/matchdata/bytebegin.rdoc
@@ -10,12 +10,12 @@ returns the offset of the beginning of the <tt>n</tt>th match:
m[3] # => "113"
m.bytebegin(3) # => 3
- m = /(т)(е)(с)/.match('тест')
- # => #<MatchData "тес" 1:"т" 2:"е" 3:"с">
- m[0] # => "тес"
- m.bytebegin(0) # => 0
- m[3] # => "с"
- m.bytebegin(3) # => 4
+ m = /(ん)(に)(ち)/.match('こんにちは')
+ # => #<MatchData "んにち" 1:"ん" 2:"に" 3:"ち">
+ m[0] # => "んにち"
+ m.bytebegin(0) # => 3
+ m[3] # => "ち"
+ m.bytebegin(3) # => 9
When string or symbol argument +name+ is given,
returns the offset of the beginning for the named match:
diff --git a/doc/matchdata/byteend.rdoc b/doc/matchdata/byteend.rdoc
index eb57664022..0a03f76208 100644
--- a/doc/matchdata/byteend.rdoc
+++ b/doc/matchdata/byteend.rdoc
@@ -10,12 +10,12 @@ returns the offset of the end of the <tt>n</tt>th match:
m[3] # => "113"
m.byteend(3) # => 6
- m = /(т)(е)(с)/.match('тест')
- # => #<MatchData "тес" 1:"т" 2:"е" 3:"с">
- m[0] # => "тес"
- m.byteend(0) # => 6
- m[3] # => "с"
- m.byteend(3) # => 6
+ m = /(ん)(に)(ち)/.match('こんにちは')
+ # => #<MatchData "んにち" 1:"ん" 2:"に" 3:"ち">
+ m[0] # => "んにち"
+ m.byteend(0) # => 12
+ m[3] # => "ち"
+ m.byteend(3) # => 12
When string or symbol argument +name+ is given,
returns the offset of the end for the named match:
diff --git a/doc/matchdata/end.rdoc b/doc/matchdata/end.rdoc
index 0209b2d2fc..c43a5428f3 100644
--- a/doc/matchdata/end.rdoc
+++ b/doc/matchdata/end.rdoc
@@ -10,12 +10,12 @@ returns the offset of the end of the <tt>n</tt>th match:
m[3] # => "113"
m.end(3) # => 6
- m = /(т)(е)(с)/.match('тест')
- # => #<MatchData "тес" 1:"т" 2:"е" 3:"с">
- m[0] # => "тес"
- m.end(0) # => 3
- m[3] # => "с"
- m.end(3) # => 3
+ m = /(ん)(に)(ち)/.match('こんにちは')
+ # => #<MatchData "んにち" 1:"ん" 2:"に" 3:"ち">
+ m[0] # => "んにち"
+ m.end(0) # => 4
+ m[3] # => "ち"
+ m.end(3) # => 4
When string or symbol argument +name+ is given,
returns the offset of the end for the named match:
diff --git a/doc/matchdata/offset.rdoc b/doc/matchdata/offset.rdoc
index 0985316d76..4194ef7ef9 100644
--- a/doc/matchdata/offset.rdoc
+++ b/doc/matchdata/offset.rdoc
@@ -11,12 +11,12 @@ returns the starting and ending offsets of the <tt>n</tt>th match:
m[3] # => "113"
m.offset(3) # => [3, 6]
- m = /(т)(е)(с)/.match('тест')
- # => #<MatchData "тес" 1:"т" 2:"е" 3:"с">
- m[0] # => "тес"
- m.offset(0) # => [0, 3]
- m[3] # => "с"
- m.offset(3) # => [2, 3]
+ m = /(ん)(に)(ち)/.match('こんにちは')
+ # => #<MatchData "んにち" 1:"ん" 2:"に" 3:"ち">
+ m[0] # => "んにち"
+ m.offset(0) # => [1, 4]
+ m[3] # => "ち"
+ m.offset(3) # => [3, 4]
When string or symbol argument +name+ is given,
returns the starting and ending offsets for the named match: