summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-12-27 14:12:02 +0000
committerPeter Zhu <peter@peterzhu.ca>2025-12-27 10:59:48 -0500
commita92c0342dd35efac8c08845b23412e5f70ecd769 (patch)
treecc8951df9abfd9fc1d563237e40ce6e337495993 /doc
parent38d24294acdf2fba8ab54fc05483e881b16dc7f1 (diff)
[DOC] Japanese only for multi-byte chars examples
Diffstat (limited to 'doc')
-rw-r--r--doc/string/chomp.rdoc1
-rw-r--r--doc/string/chop.rdoc2
-rw-r--r--doc/string/chr.rdoc1
-rw-r--r--doc/string/codepoints.rdoc1
-rw-r--r--doc/string/concat.rdoc1
-rw-r--r--doc/string/count.rdoc4
-rw-r--r--doc/string/delete.rdoc4
-rw-r--r--doc/string/delete_prefix.rdoc1
-rw-r--r--doc/string/delete_suffix.rdoc1
-rw-r--r--doc/string/dump.rdoc8
-rw-r--r--doc/string/each_byte.rdoc3
-rw-r--r--doc/string/each_char.rdoc5
-rw-r--r--doc/string/each_codepoint.rdoc5
-rw-r--r--doc/string/each_grapheme_cluster.rdoc6
-rw-r--r--doc/string/end_with_p.rdoc1
-rw-r--r--doc/string/getbyte.rdoc3
-rw-r--r--doc/string/index.rdoc4
-rw-r--r--doc/string/insert.rdoc1
-rw-r--r--doc/string/inspect.rdoc1
-rw-r--r--doc/string/intern.rdoc1
-rw-r--r--doc/string/length.rdoc2
-rw-r--r--doc/string/ljust.rdoc1
-rw-r--r--doc/string/ord.rdoc1
-rw-r--r--doc/string/partition.rdoc1
-rw-r--r--doc/string/rindex.rdoc1
-rw-r--r--doc/string/rjust.rdoc1
-rw-r--r--doc/string/rpartition.rdoc2
-rw-r--r--doc/string/scan.rdoc1
-rw-r--r--doc/string/split.rdoc2
-rw-r--r--doc/string/start_with_p.rdoc1
-rw-r--r--doc/string/succ.rdoc1
-rw-r--r--doc/string/sum.rdoc1
32 files changed, 0 insertions, 69 deletions
diff --git a/doc/string/chomp.rdoc b/doc/string/chomp.rdoc
index 6ec7664f6b..4efff5c291 100644
--- a/doc/string/chomp.rdoc
+++ b/doc/string/chomp.rdoc
@@ -9,7 +9,6 @@ if they are <tt>"\r"</tt>, <tt>"\n"</tt>, or <tt>"\r\n"</tt>
"abc\n".chomp # => "abc"
"abc\r\n".chomp # => "abc"
"abc\n\r".chomp # => "abc\n"
- "тест\r\n".chomp # => "тест"
"こんにちは\r\n".chomp # => "こんにちは"
When +line_sep+ is <tt>''</tt> (an empty string),
diff --git a/doc/string/chop.rdoc b/doc/string/chop.rdoc
index 2c48e91129..d818ba467a 100644
--- a/doc/string/chop.rdoc
+++ b/doc/string/chop.rdoc
@@ -3,13 +3,11 @@ Returns a new string copied from +self+, with trailing characters possibly remov
Removes <tt>"\r\n"</tt> if those are the last two characters.
"abc\r\n".chop # => "abc"
- "тест\r\n".chop # => "тест"
"こんにちは\r\n".chop # => "こんにちは"
Otherwise removes the last character if it exists.
'abcd'.chop # => "abc"
- 'тест'.chop # => "тес"
'こんにちは'.chop # => "こんにち"
''.chop # => ""
diff --git a/doc/string/chr.rdoc b/doc/string/chr.rdoc
index 1ada3854cb..153d5d71c3 100644
--- a/doc/string/chr.rdoc
+++ b/doc/string/chr.rdoc
@@ -1,7 +1,6 @@
Returns a string containing the first character of +self+:
'hello'.chr # => "h"
- 'тест'.chr # => "т"
'こんにちは'.chr # => "こ"
''.chr # => ""
diff --git a/doc/string/codepoints.rdoc b/doc/string/codepoints.rdoc
index d9586d2e0b..22cb22c889 100644
--- a/doc/string/codepoints.rdoc
+++ b/doc/string/codepoints.rdoc
@@ -2,7 +2,6 @@ Returns an array of the codepoints in +self+;
each codepoint is the integer value for a character:
'hello'.codepoints # => [104, 101, 108, 108, 111]
- 'тест'.codepoints # => [1090, 1077, 1089, 1090]
'こんにちは'.codepoints # => [12371, 12435, 12395, 12385, 12399]
''.codepoints # => []
diff --git a/doc/string/concat.rdoc b/doc/string/concat.rdoc
index 2ba0c714af..92ba664b8c 100644
--- a/doc/string/concat.rdoc
+++ b/doc/string/concat.rdoc
@@ -6,7 +6,6 @@ For each given object +object+ that is an integer,
the value is considered a codepoint and converted to a character before concatenation:
'foo'.concat(32, 'bar', 32, 'baz') # => "foo bar baz" # Embeds spaces.
- 'те'.concat(1089, 1090) # => "тест"
'こん'.concat(12395, 12385, 12399) # => "こんにちは"
Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].
diff --git a/doc/string/count.rdoc b/doc/string/count.rdoc
index 092c672d7d..7a3b9f1e21 100644
--- a/doc/string/count.rdoc
+++ b/doc/string/count.rdoc
@@ -9,10 +9,6 @@ returns the count of instances of that character:
s.count('x') # => 0
s.count('') # => 0
- s = 'тест'
- s.count('т') # => 2
- s.count('е') # => 1
-
s = 'よろしくお願いします'
s.count('よ') # => 1
s.count('し') # => 2
diff --git a/doc/string/delete.rdoc b/doc/string/delete.rdoc
index e8ff4c0ae4..1827f177e6 100644
--- a/doc/string/delete.rdoc
+++ b/doc/string/delete.rdoc
@@ -10,10 +10,6 @@ removes all instances of that character:
s.delete('x') # => "abracadabra"
s.delete('') # => "abracadabra"
- s = 'тест'
- s.delete('т') # => "ес"
- s.delete('е') # => "тст"
-
s = 'よろしくお願いします'
s.delete('よ') # => "ろしくお願いします"
s.delete('し') # => "よろくお願います"
diff --git a/doc/string/delete_prefix.rdoc b/doc/string/delete_prefix.rdoc
index 1135f3d19d..6255e300e3 100644
--- a/doc/string/delete_prefix.rdoc
+++ b/doc/string/delete_prefix.rdoc
@@ -4,7 +4,6 @@ Returns a copy of +self+ with leading substring +prefix+ removed:
'oof'.delete_prefix('oo') # => "f"
'oof'.delete_prefix('oof') # => ""
'oof'.delete_prefix('x') # => "oof"
- 'тест'.delete_prefix('те') # => "ст"
'こんにちは'.delete_prefix('こん') # => "にちは"
Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].
diff --git a/doc/string/delete_suffix.rdoc b/doc/string/delete_suffix.rdoc
index 2fb70ce012..a4d9a80f85 100644
--- a/doc/string/delete_suffix.rdoc
+++ b/doc/string/delete_suffix.rdoc
@@ -5,7 +5,6 @@ Returns a copy of +self+ with trailing substring <tt>suffix</tt> removed:
'foo'.delete_suffix('foo') # => ""
'foo'.delete_suffix('f') # => "foo"
'foo'.delete_suffix('x') # => "foo"
- 'тест'.delete_suffix('ст') # => "те"
'こんにちは'.delete_suffix('ちは') # => "こんに"
Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].
diff --git a/doc/string/dump.rdoc b/doc/string/dump.rdoc
index 2ab9521540..add3c35662 100644
--- a/doc/string/dump.rdoc
+++ b/doc/string/dump.rdoc
@@ -69,10 +69,6 @@ and so contains both outer double-quotes and escaped inner double-quotes:
If +self+ is encoded in UTF-8 and contains Unicode characters,
each Unicode character is dumped as a Unicode escape sequence:
- String: тест
- Dumped: "\u0442\u0435\u0441\u0442"
- Undumped: тест
-
String: こんにちは
Dumped: "\u3053\u3093\u306B\u3061\u306F"
Undumped: こんにちは
@@ -88,10 +84,6 @@ where <tt><encoding></tt> is <tt>self.encoding.name</tt>:
Dumped: "\xFE\xFF\x00h\x00e\x00l\x00l\x00o".dup.force_encoding("UTF-16")
Undumped: hello
- String: тест
- Dumped: "\xFE\xFF\x04B\x045\x04A\x04B".dup.force_encoding("UTF-16")
- Undumped: тест
-
String: こんにちは
Dumped: "\xFE\xFF0S0\x930k0a0o".dup.force_encoding("UTF-16")
Undumped: こんにちは
diff --git a/doc/string/each_byte.rdoc b/doc/string/each_byte.rdoc
index 1f1069863b..642d71e84b 100644
--- a/doc/string/each_byte.rdoc
+++ b/doc/string/each_byte.rdoc
@@ -5,9 +5,6 @@ returns +self+:
'hello'.each_byte {|byte| a.push(byte) } # Five 1-byte characters.
a # => [104, 101, 108, 108, 111]
a = []
- 'тест'.each_byte {|byte| a.push(byte) } # Four 2-byte characters.
- a # => [209, 130, 208, 181, 209, 129, 209, 130]
- a = []
'こんにちは'.each_byte {|byte| a.push(byte) } # Five 3-byte characters.
a # => [227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]
diff --git a/doc/string/each_char.rdoc b/doc/string/each_char.rdoc
index 5aa85b28ad..2dd56711d3 100644
--- a/doc/string/each_char.rdoc
+++ b/doc/string/each_char.rdoc
@@ -7,11 +7,6 @@ returns +self+:
end
a # => ["h", "e", "l", "l", "o"]
a = []
- 'тест'.each_char do |char|
- a.push(char)
- end
- a # => ["т", "е", "с", "т"]
- a = []
'こんにちは'.each_char do |char|
a.push(char)
end
diff --git a/doc/string/each_codepoint.rdoc b/doc/string/each_codepoint.rdoc
index 0e687082d3..8e4e7545e6 100644
--- a/doc/string/each_codepoint.rdoc
+++ b/doc/string/each_codepoint.rdoc
@@ -8,11 +8,6 @@ returns +self+:
end
a # => [104, 101, 108, 108, 111]
a = []
- 'тест'.each_codepoint do |codepoint|
- a.push(codepoint)
- end
- a # => [1090, 1077, 1089, 1090]
- a = []
'こんにちは'.each_codepoint do |codepoint|
a.push(codepoint)
end
diff --git a/doc/string/each_grapheme_cluster.rdoc b/doc/string/each_grapheme_cluster.rdoc
index 8bc6f78aaa..384cd6967d 100644
--- a/doc/string/each_grapheme_cluster.rdoc
+++ b/doc/string/each_grapheme_cluster.rdoc
@@ -9,12 +9,6 @@ returns +self+:
a # => ["h", "e", "l", "l", "o"]
a = []
- 'тест'.each_grapheme_cluster do |grapheme_cluster|
- a.push(grapheme_cluster)
- end
- a # => ["т", "е", "с", "т"]
-
- a = []
'こんにちは'.each_grapheme_cluster do |grapheme_cluster|
a.push(grapheme_cluster)
end
diff --git a/doc/string/end_with_p.rdoc b/doc/string/end_with_p.rdoc
index fcd9242122..9a95d74fde 100644
--- a/doc/string/end_with_p.rdoc
+++ b/doc/string/end_with_p.rdoc
@@ -4,7 +4,6 @@ Returns whether +self+ ends with any of the given +strings+:
'foo'.end_with?('bar', 'oo') # => true
'foo'.end_with?('bar', 'baz') # => false
'foo'.end_with?('') # => true
- 'тест'.end_with?('т') # => true
'こんにちは'.end_with?('は') # => true
Related: see {Querying}[rdoc-ref:String@Querying].
diff --git a/doc/string/getbyte.rdoc b/doc/string/getbyte.rdoc
index ba1c06fd27..1d0ed2a5a4 100644
--- a/doc/string/getbyte.rdoc
+++ b/doc/string/getbyte.rdoc
@@ -16,9 +16,6 @@ Returns +nil+ if +index+ is out of range:
More examples:
- s = 'тест'
- s.bytes # => [209, 130, 208, 181, 209, 129, 209, 130]
- s.getbyte(2) # => 208
s = 'こんにちは'
s.bytes # => [227, 129, 147, 227, 130, 147, 227, 129, 171, 227, 129, 161, 227, 129, 175]
s.getbyte(2) # => 147
diff --git a/doc/string/index.rdoc b/doc/string/index.rdoc
index 6045fac0f6..c3cff24dac 100644
--- a/doc/string/index.rdoc
+++ b/doc/string/index.rdoc
@@ -8,7 +8,6 @@ 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+:
@@ -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
diff --git a/doc/string/insert.rdoc b/doc/string/insert.rdoc
index d8252d5ec5..73205f2069 100644
--- a/doc/string/insert.rdoc
+++ b/doc/string/insert.rdoc
@@ -5,7 +5,6 @@ If the given +index+ is non-negative, inserts +other_string+ at offset +index+:
'foo'.insert(0, 'bar') # => "barfoo"
'foo'.insert(1, 'bar') # => "fbaroo"
'foo'.insert(3, 'bar') # => "foobar"
- 'тест'.insert(2, 'bar') # => "теbarст" # Characters, not bytes.
'こんにちは'.insert(2, 'bar') # => "こんbarにちは"
If the +index+ is negative, counts backward from the end of +self+
diff --git a/doc/string/inspect.rdoc b/doc/string/inspect.rdoc
index 828ecf966d..907828c2af 100644
--- a/doc/string/inspect.rdoc
+++ b/doc/string/inspect.rdoc
@@ -6,7 +6,6 @@ Most printable characters are rendered simply as themselves:
'012'.inspect # => "\"012\""
''.inspect # => "\"\""
"\u000012".inspect # => "\"\\u000012\""
- 'тест'.inspect # => "\"тест\""
'こんにちは'.inspect # => "\"こんにちは\""
But printable characters double-quote (<tt>'"'</tt>) and backslash and (<tt>'\\'</tt>) are escaped:
diff --git a/doc/string/intern.rdoc b/doc/string/intern.rdoc
index 1336e4688f..eded6ac3d7 100644
--- a/doc/string/intern.rdoc
+++ b/doc/string/intern.rdoc
@@ -2,7 +2,6 @@ Returns the Symbol object derived from +self+,
creating it if it did not already exist:
'foo'.intern # => :foo
- 'тест'.intern # => :тест
'こんにちは'.intern # => :こんにちは
Related: see {Converting to Non-String}[rdoc-ref:String@Converting+to+Non--5CString].
diff --git a/doc/string/length.rdoc b/doc/string/length.rdoc
index 5b302380b5..eb68edb10c 100644
--- a/doc/string/length.rdoc
+++ b/doc/string/length.rdoc
@@ -1,13 +1,11 @@
Returns the count of characters (not bytes) in +self+:
'foo'.length # => 3
- 'тест'.length # => 4
'こんにちは'.length # => 5
Contrast with String#bytesize:
'foo'.bytesize # => 3
- 'тест'.bytesize # => 8
'こんにちは'.bytesize # => 15
Related: see {Querying}[rdoc-ref:String@Querying].
diff --git a/doc/string/ljust.rdoc b/doc/string/ljust.rdoc
index f37c0b3151..a8ca62ee76 100644
--- a/doc/string/ljust.rdoc
+++ b/doc/string/ljust.rdoc
@@ -3,7 +3,6 @@ Returns a copy of +self+, left-justified and, if necessary, right-padded with th
'hello'.ljust(10) # => "hello "
' hello'.ljust(10) # => " hello "
'hello'.ljust(10, 'ab') # => "helloababa"
- 'тест'.ljust(10) # => "тест "
'こんにちは'.ljust(10) # => "こんにちは "
If <tt>width <= self.length</tt>, returns a copy of +self+:
diff --git a/doc/string/ord.rdoc b/doc/string/ord.rdoc
index a5ddbb4e2f..87b469db02 100644
--- a/doc/string/ord.rdoc
+++ b/doc/string/ord.rdoc
@@ -2,7 +2,6 @@ Returns the integer ordinal of the first character of +self+:
'h'.ord # => 104
'hello'.ord # => 104
- 'тест'.ord # => 1090
'こんにちは'.ord # => 12371
Related: see {Converting to Non-String}[rdoc-ref:String@Converting+to+Non--5CString].
diff --git a/doc/string/partition.rdoc b/doc/string/partition.rdoc
index d822f8ec0e..614ad029d4 100644
--- a/doc/string/partition.rdoc
+++ b/doc/string/partition.rdoc
@@ -38,7 +38,6 @@ then performs the equivalent of <tt>self.index(pattern)</tt>
'hello'.partition('o') # => ["hell", "o", ""]
'hello'.partition('') # => ["", "", "hello"]
'hello'.partition('x') # => ["hello", "", ""]
- 'тест'.partition('т') # => ["", "т", "ест"]
'こんにちは'.partition('に') # => ["こん", "に", "ちは"]
Related: see {Converting to Non-String}[rdoc-ref:String@Converting+to+Non--5CString].
diff --git a/doc/string/rindex.rdoc b/doc/string/rindex.rdoc
index 8a1cc0106f..2b81c3716d 100644
--- a/doc/string/rindex.rdoc
+++ b/doc/string/rindex.rdoc
@@ -7,7 +7,6 @@ When +pattern+ is a string, returns the index of the last matching substring in
'foo'.rindex('o') # => 2
'foo'.rindex('oo' # => 1
'foo'.rindex('ooo') # => nil
- 'тест'.rindex('т') # => 3
'こんにちは'.rindex('ち') # => 3
When +pattern+ is a Regexp, returns the index of the last match in self:
diff --git a/doc/string/rjust.rdoc b/doc/string/rjust.rdoc
index 864cfcce7a..acd3f198d4 100644
--- a/doc/string/rjust.rdoc
+++ b/doc/string/rjust.rdoc
@@ -7,7 +7,6 @@ right justified and padded on the left with +pad_string+:
'hello'.rjust(10) # => " hello"
'hello '.rjust(10) # => " hello "
'hello'.rjust(10, 'ab') # => "ababahello"
- 'тест'.rjust(10) # => " тест"
'こんにちは'.rjust(10) # => " こんにちは"
If <tt>width <= self.size</tt>, returns a copy of +self+:
diff --git a/doc/string/rpartition.rdoc b/doc/string/rpartition.rdoc
index 6a17b5e944..eed03949a5 100644
--- a/doc/string/rpartition.rdoc
+++ b/doc/string/rpartition.rdoc
@@ -31,7 +31,6 @@ If +pattern+ is a Regexp, searches for the last matching substring
'hello'.rpartition(/o/) # => ["hell", "o", ""]
'hello'.rpartition(//) # => ["hello", "", ""]
'hello'.rpartition(/x/) # => ["", "", "hello"]
- 'тест'.rpartition(/т/) # => ["тес", "т", ""]
'こんにちは'.rpartition(/に/) # => ["こん", "に", "ちは"]
If +pattern+ is not a Regexp, converts it to a string (if it is not already one),
@@ -43,7 +42,6 @@ then searches for the last matching substring
'hello'.rpartition('h') # => ["", "h", "ello"]
'hello'.rpartition('o') # => ["hell", "o", ""]
'hello'.rpartition('') # => ["hello", "", ""]
- 'тест'.rpartition('т') # => ["тес", "т", ""]
'こんにちは'.rpartition('に') # => ["こん", "に", "ちは"]
Related: see {Converting to Non-String}[rdoc-ref:String@Converting+to+Non--5CString].
diff --git a/doc/string/scan.rdoc b/doc/string/scan.rdoc
index cbede5280f..04a2b02ff4 100644
--- a/doc/string/scan.rdoc
+++ b/doc/string/scan.rdoc
@@ -16,7 +16,6 @@ With no block given, returns an array of the results:
'cruel world'.scan(/.../) # => ["cru", "el ", "wor"]
'cruel world'.scan(/(...)/) # => [["cru"], ["el "], ["wor"]]
'cruel world'.scan(/(..)(..)/) # => [["cr", "ue"], ["l ", "wo"]]
- 'тест'.scan(/../) # => ["те", "ст"]
'こんにちは'.scan(/../) # => ["こん", "にち"]
'abracadabra'.scan('ab') # => ["ab", "ab"]
'abracadabra'.scan('nosuch') # => []
diff --git a/doc/string/split.rdoc b/doc/string/split.rdoc
index 9e61bc5bab..1aee1de0a4 100644
--- a/doc/string/split.rdoc
+++ b/doc/string/split.rdoc
@@ -23,7 +23,6 @@ splits at every character:
'abracadabra'.split('') # => ["a", "b", "r", "a", "c", "a", "d", "a", "b", "r", "a"]
''.split('') # => []
- 'тест'.split('') # => ["т", "е", "с", "т"]
'こんにちは'.split('') # => ["こ", "ん", "に", "ち", "は"]
When +field_sep+ is a non-empty string and different from <tt>' '</tt> (a single space),
@@ -32,7 +31,6 @@ uses that string as the separator:
'abracadabra'.split('a') # => ["", "br", "c", "d", "br"]
'abracadabra'.split('ab') # => ["", "racad", "ra"]
''.split('a') # => []
- 'тест'.split('т') # => ["", "ес"]
'こんにちは'.split('に') # => ["こん", "ちは"]
When +field_sep+ is a Regexp,
diff --git a/doc/string/start_with_p.rdoc b/doc/string/start_with_p.rdoc
index 298a557276..f78edc7fa3 100644
--- a/doc/string/start_with_p.rdoc
+++ b/doc/string/start_with_p.rdoc
@@ -11,7 +11,6 @@ Returns +true+ if any pattern matches the beginning, +false+ otherwise:
'hello'.start_with?(/H/i) # => true
'hello'.start_with?('heaven', 'hell') # => true
'hello'.start_with?('heaven', 'paradise') # => false
- 'тест'.start_with?('т') # => true
'こんにちは'.start_with?('こ') # => true
Related: see {Querying}[rdoc-ref:String@Querying].
diff --git a/doc/string/succ.rdoc b/doc/string/succ.rdoc
index 3653112b83..1b4b936a8e 100644
--- a/doc/string/succ.rdoc
+++ b/doc/string/succ.rdoc
@@ -7,7 +7,6 @@ or, if no alphanumerics, the rightmost character:
'THX1138'.succ # => "THX1139"
'<<koala>>'.succ # => "<<koalb>>"
'***'.succ # => '**+'
- 'тест'.succ # => "тесу"
'こんにちは'.succ # => "こんにちば"
The successor to a digit is another digit, "carrying" to the next-left
diff --git a/doc/string/sum.rdoc b/doc/string/sum.rdoc
index 125611411e..22045e5f4d 100644
--- a/doc/string/sum.rdoc
+++ b/doc/string/sum.rdoc
@@ -5,7 +5,6 @@ modulo <tt>2**n - 1</tt>:
'hello'.sum # => 532
'hello'.sum(4) # => 4
'hello'.sum(64) # => 532
- 'тест'.sum # => 1405
'こんにちは'.sum # => 2582
This is not a particularly strong checksum.