クラス
-
ARGF
. class (209) - Array (85)
- BasicObject (11)
- Bignum (6)
- Binding (6)
- Complex (22)
- Data (8)
- Dir (163)
- Encoding (99)
-
Encoding
:: Converter (143) -
Encoding
:: InvalidByteSequenceError (33) -
Encoding
:: UndefinedConversionError (22) - Enumerator (22)
-
Enumerator
:: ArithmeticSequence (6) -
Enumerator
:: Chain (6) - Exception (62)
- FalseClass (22)
- File (154)
-
File
:: Stat (22) - Fixnum (6)
- Float (22)
- Hash (22)
- IO (392)
- Integer (55)
- LoadError (11)
- MatchData (143)
- Method (33)
- Module (401)
- NameError (11)
- NilClass (17)
- Object (241)
- Proc (33)
-
Process
:: Status (22) - Random (26)
- Range (40)
- Rational (22)
- Refinement (3)
- Regexp (143)
- RubyVM (22)
-
RubyVM
:: AbstractSyntaxTree :: Node (6) -
RubyVM
:: InstructionSequence (128) - SignalException (11)
- String (1988)
- Struct (36)
- Symbol (299)
- SyntaxError (2)
- Thread (69)
-
Thread
:: Backtrace :: Location (66) - Time (60)
- TracePoint (50)
- TrueClass (22)
- UnboundMethod (44)
- UncaughtThrowError (10)
モジュール
-
File
:: Constants (11) - GC (11)
-
GC
:: Profiler (11) - Kernel (655)
- Marshal (44)
- Process (22)
-
RubyVM
:: AbstractSyntaxTree (8) - Signal (33)
キーワード
-
$ " (11) -
$ & (11) -
$ & # 39; (11) -
$ * (11) -
$ + (11) -
$ , (11) -
$ -0 (11) -
$ -F (11) -
$ -I (11) -
$ -i (11) -
$ / (11) -
$ 0 (11) -
$ 1 (11) -
$ 10 (11) -
$ 11 (11) -
$ 2 (11) -
$ 3 (11) -
$ 4 (11) -
$ 5 (11) -
$ 6 (11) -
$ 7 (11) -
$ 8 (11) -
$ 9 (11) -
$ : (11) -
$ ; (11) -
$ @ (11) -
$ FILENAME (11) -
$ LOADED _ FEATURES (11) -
$ LOAD _ PATH (11) -
$ PROGRAM _ NAME (11) -
$ \ (11) -
$ _ (11) -
$ ` (11) - % (17)
- * (33)
- + (11)
- +@ (9)
- -@ (9)
- << (11)
- <=> (22)
- == (11)
- === (33)
- =~ (48)
- Complex (11)
- Converter (11)
- Encoding (11)
- Float (6)
-
INSTRUCTION
_ NAMES (11) - Integer (11)
- NULL (11)
- OPTS (22)
-
RUBY
_ COPYRIGHT (11) -
RUBY
_ DESCRIPTION (11) -
RUBY
_ ENGINE (11) -
RUBY
_ ENGINE _ VERSION (9) -
RUBY
_ PLATFORM (11) -
RUBY
_ RELEASE _ DATE (11) -
RUBY
_ REVISION (5) -
RUBY
_ VERSION (11) - String (22)
- [] (187)
- []= (77)
-
_ _ dir _ _ (11) -
_ _ id _ _ (11) -
_ dump (11) - ` (11)
-
absolute
_ path (33) -
alias
_ method (11) - argv0 (11)
- arity (11)
-
ascii
_ only? (11) -
asciicompat
_ encoding (22) - asctime (11)
- attr (24)
-
attr
_ accessor (8) -
attr
_ reader (8) -
attr
_ writer (11) - autoload (22)
- autoload? (22)
- b (11)
- backtrace (22)
-
base
_ label (22) - basename (11)
- binread (11)
- binwrite (11)
- byteindex (2)
- byterindex (2)
- bytes (39)
- bytesize (11)
- byteslice (33)
- bytesplice (4)
- caller (33)
- capitalize (22)
- capitalize! (11)
- captures (11)
- casecmp (22)
- casecmp? (16)
- center (11)
- chars (22)
- children (20)
- chomp (22)
- chomp! (11)
- chop (22)
- chop! (11)
- chr (33)
-
class
_ variable _ defined? (11) -
class
_ variable _ get (11) -
class
_ variable _ set (11) - clear (11)
- codepoints (22)
- compile (11)
-
compile
_ option (11) - concat (19)
-
const
_ defined? (11) -
const
_ get (11) -
const
_ source _ location (5) - convert (11)
- count (11)
- crypt (11)
- ctime (11)
- dedup (2)
-
default
_ internal (11) - define (4)
-
define
_ method (44) -
define
_ singleton _ method (22) - delete (33)
- delete! (11)
-
delete
_ prefix (7) -
delete
_ prefix! (7) -
delete
_ suffix (7) -
delete
_ suffix! (7) -
destination
_ encoding _ name (22) - dev (11)
- dirname (11)
- disasm (22)
- disassemble (22)
- downcase (19)
- downcase! (11)
- dummy? (11)
- dump (33)
-
each
_ byte (22) -
each
_ char (22) -
each
_ codepoint (22) -
each
_ grapheme _ cluster (14) -
each
_ line (22) - empty? (11)
- encode (33)
- encode! (22)
- encoding (22)
-
end
_ with? (16) - entries (22)
- eql? (11)
-
error
_ bytes (11) -
error
_ char (11) - escape (11)
-
eval
_ script (6) - extname (11)
- fetch (33)
- filename (11)
- find (11)
- finish (11)
-
for
_ fd (11) -
force
_ encoding (11) - format (11)
- ftype (22)
- getbyte (11)
- getc (22)
- gets (77)
- getwd (11)
- glob (22)
-
grapheme
_ clusters (14) - gsub (66)
- gsub! (44)
- hash (22)
- hex (11)
- home (22)
- id2name (11)
-
import
_ methods (3) - include? (11)
- index (18)
-
inplace
_ mode (11) - insert (11)
-
insert
_ output (11) - inspect (361)
-
instance
_ method (11) - intern (22)
- itself (11)
- join (22)
- key (11)
- keys (11)
- label (22)
-
last
_ match (11) - length (22)
- lines (22)
- ljust (11)
- load (11)
-
load
_ from _ binary _ extra _ data (9) -
locale
_ charmap (11) - lstrip (11)
- lstrip! (11)
- match (33)
- match? (8)
-
method
_ defined? (11) -
module
_ function (19) - name (35)
- name= (9)
-
name
_ list (11) -
named
_ captures (11) - names (33)
- new (108)
- next (11)
- next! (11)
- oct (11)
- open (22)
- ord (22)
- pack (19)
- parse (8)
- partition (11)
- path (92)
-
post
_ match (11) -
pre
_ match (11) - pread (7)
- prepend (19)
- private (46)
-
private
_ class _ method (15) -
private
_ constant (11) -
private
_ method _ defined? (11) - protected (8)
-
protected
_ method _ defined? (11) - public (46)
-
public
_ class _ method (15) -
public
_ constant (11) -
public
_ instance _ method (11) -
public
_ method (11) -
public
_ method _ defined? (11) - putback (22)
- pwd (11)
- pwrite (7)
- quote (11)
-
raw
_ seed (2) - read (66)
-
read
_ nonblock (22) -
readagain
_ bytes (11) - readchar (22)
- readline (77)
- readlines (77)
- readlink (11)
- readpartial (22)
- realdirpath (11)
- realpath (11)
-
remove
_ class _ variable (11) - replace (11)
- replacement (11)
- replacement= (11)
- restore (11)
- result (11)
- reverse (11)
- reverse! (11)
- rindex (11)
- rjust (11)
- rpartition (11)
- rstrip (11)
- rstrip! (11)
- scan (22)
- scrub (33)
- scrub! (33)
-
set
_ backtrace (11) -
set
_ encoding (66) - setbyte (11)
- setproctitle (11)
- shift (11)
- signame (11)
- signm (11)
-
singleton
_ class (11) -
singleton
_ method (11) - size (22)
- slice (121)
- slice! (66)
- source (11)
-
source
_ location (39) - split (28)
- sprintf (11)
- squeeze (11)
- squeeze! (11)
-
start
_ with? (16) - status (11)
- step (12)
- store (11)
- strftime (11)
- strip (11)
- strip! (11)
- sub (55)
- sub! (33)
- succ (11)
- succ! (11)
- sum (11)
- swapcase (19)
- swapcase! (11)
- sysread (11)
- syswrite (11)
- tainted? (6)
-
thread
_ variable? (11) -
to
_ a (22) -
to
_ binary (9) -
to
_ c (11) -
to
_ f (11) -
to
_ i (11) -
to
_ path (24) -
to
_ r (11) -
to
_ s (333) -
to
_ str (22) -
to
_ sym (22) - tr (11)
- tr! (11)
-
tr
_ s (11) -
tr
_ s! (11) - trace (11)
-
trace
_ var (33) - trap (44)
-
try
_ convert (22) - undump (7)
-
unicode
_ normalize (10) -
unicode
_ normalize! (10) -
unicode
_ normalized? (10) - union (11)
- unpack (11)
- unpack1 (8)
-
untrace
_ var (11) - upcase (19)
- upcase! (11)
- upto (11)
- urandom (7)
- using (11)
-
valid
_ encoding? (11) - values (11)
-
values
_ at (22) -
with
_ object (22) - write (22)
-
write
_ nonblock (11) -
yield
_ self (14) - zone (11)
検索結果
先頭5件
-
MatchData
# string -> String (32410.0) -
マッチ対象になった文字列の複製を返します。
...マッチ対象になった文字列の複製を返します。
返す文字列はフリーズ(Object#freeze)されています。
//emlist[例][ruby]{
m = /(.)(.)(\d+)(\d)/.match("THX1138.")
m.string # => "THX1138."
//}... -
Encoding
:: InvalidByteSequenceError # destination _ encoding _ name -> String (26403.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::InvalidByteSequenceError#destination_encoding... -
Encoding
:: UndefinedConversionError # destination _ encoding _ name -> String (26403.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::UndefinedConversionError#destination_encoding... -
String
# inspect -> String (26327.0) -
文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。 変換された文字列は印字可能な文字のみによって構成されます
...ために用意されています。
永続化などの目的で文字列をダンプしたいときは、
String#dump を使うべきです。
//emlist[例][ruby]{
# p ではないことに注意
puts "string".inspect # => "string"
puts "\t\r\n".inspect # => "\t\r\n"
//}
@see String#dump... -
String
# lines(rs = $ / , chomp: false) -> [String] (26321.0) -
文字列中の各行を文字列の配列で返します。(self.each_line.to_a と同じです)
...(self.each_line.to_a と同じです)
//emlist[][ruby]{
"aa\nbb\ncc\n".lines # => ["aa\n", "bb\n", "cc\n"]
//}
行の区切りは rs に指定した文字列で、 そのデフォルト値は変数 $/ の値です。
各 line には区切りの文字列も含みます。
rs に nil を指定す......rs を取り除きます。
//emlist[][ruby]{
"hello\nworld\n".lines # => ["hello\n", "world\n"]
"hello\nworld\n".lines(chomp: true) # => ["hello", "world"]
//}
@param rs 行末を示す文字列
@param chomp 分割した各行に対して String#chomp と同等の結果を得......省略した場合は false を指定したとみなされます。
ブロックが指定された場合は String#each_line と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_line... -
String
# lines(rs = $ / ) -> [String] (26315.0) -
文字列中の各行を文字列の配列で返します。(self.each_line.to_a と同じです)
...(self.each_line.to_a と同じです)
//emlist[][ruby]{
"aa\nbb\ncc\n".lines # => ["aa\n", "bb\n", "cc\n"]
//}
行の区切りは rs に指定した文字列で、 そのデフォルト値は変数 $/ の値です。
各 line には区切りの文字列も含みます。
rs に nil を指定す......(つまり空行で分割します)。
@param rs 行末を示す文字列
ブロックが指定された場合は String#each_line と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_line... -
String
# byterindex(pattern , offset = self . bytesize) -> Integer | nil (26232.0) -
文字列のバイト単位のインデックス offset から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...す。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定します。
offset が負の場合は、文字列の末尾から数えた位置から探索します。
byterindex と String#byteindex とでは、探索方向だけ......mlist[String#byteindex の場合][ruby]{
p "stringstring".byteindex("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#byterindex の場合][ruby]{
p "stringstring".byterindex("in......g", -1) # => 9
# ing # インデックス -1 の文字から探索を始める
# ing
# ing # 左にずらしていってここで見つかる
//}
@param pattern 探索する部分文字列または正規表現
@param offset 探索を始めるバイ... -
String
# rindex(pattern , pos = self . size) -> Integer | nil (26226.0) -
文字列のインデックス pos から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のインデックスを返します。 見つからなければ nil を返します。
...します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定します。
pos が負の場合は、文字列の末尾から数えた位置から探索します。
rindex と String#index とでは、探索方向だけが......。
//emlist[String#index の場合][ruby]{
p "stringstring".index("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#rindex の場合][ruby]{
p "stringstring".rindex("ing", -1)......# ing # インデックス -1 の文字から探索を始める
# ing
# ing # 左にずらしていってここで見つかる
//}
@param pattern 探索する部分文字列または正規表現
@param pos 探索を始めるインデックス
//emlis... -
String
# lines(rs = $ / , chomp: false) {|line| . . . } -> self (26221.0) -
文字列中の各行を文字列の配列で返します。(self.each_line.to_a と同じです)
...(self.each_line.to_a と同じです)
//emlist[][ruby]{
"aa\nbb\ncc\n".lines # => ["aa\n", "bb\n", "cc\n"]
//}
行の区切りは rs に指定した文字列で、 そのデフォルト値は変数 $/ の値です。
各 line には区切りの文字列も含みます。
rs に nil を指定す......rs を取り除きます。
//emlist[][ruby]{
"hello\nworld\n".lines # => ["hello\n", "world\n"]
"hello\nworld\n".lines(chomp: true) # => ["hello", "world"]
//}
@param rs 行末を示す文字列
@param chomp 分割した各行に対して String#chomp と同等の結果を得......省略した場合は false を指定したとみなされます。
ブロックが指定された場合は String#each_line と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_line... -
String
# lines(rs = $ / ) {|line| . . . } -> self (26215.0) -
文字列中の各行を文字列の配列で返します。(self.each_line.to_a と同じです)
...(self.each_line.to_a と同じです)
//emlist[][ruby]{
"aa\nbb\ncc\n".lines # => ["aa\n", "bb\n", "cc\n"]
//}
行の区切りは rs に指定した文字列で、 そのデフォルト値は変数 $/ の値です。
各 line には区切りの文字列も含みます。
rs に nil を指定す......(つまり空行で分割します)。
@param rs 行末を示す文字列
ブロックが指定された場合は String#each_line と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_line... -
String
# byteindex(pattern , offset = 0) -> Integer | nil (26214.0) -
文字列の offset から右に向かって pattern を検索し、 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...n を検索し、
最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定します。
offset が負の場合、文字列の......ト
@raise IndexError オフセットが文字列の境界以外をさしているときに発生します。
//emlist[例][ruby]{
'foo'.byteindex('f') # => 0
'foo'.byteindex('o') # => 1
'foo'.byteindex('oo') # => 1
'foo'.byteindex('ooo') # => nil
'foo'.byteindex(/f/) # => 0
'foo'.byteindex(/o/)......teindex(/oo/) # => 1
'foo'.byteindex(/ooo/) # => nil
'foo'.byteindex('o', 1) # => 1
'foo'.byteindex('o', 2) # => 2
'foo'.byteindex('o', 3) # => nil
'foo'.byteindex('o', -1) # => 2
'foo'.byteindex('o', -2) # => 1
'foo'.byteindex('o', -3) # => 1
'foo'.byteindex('o', -4) # => nil
'あいう'.byteind... -
String
# codepoints -> [Integer] (26214.0) -
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
...列を返します。(self.each_codepoint.to_a と同じです)
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}
ブロックが指定された場合は String#each_codepoint と同じように動作します。......Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_codepoint... -
String
# codepoints {|codepoint| block } -> self (26214.0) -
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
...列を返します。(self.each_codepoint.to_a と同じです)
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}
ブロックが指定された場合は String#each_codepoint と同じように動作します。......Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_codepoint...