1294件ヒット
[101-200件を表示]
(0.370秒)
種類
- インスタンスメソッド (872)
- 特異メソッド (233)
- クラス (93)
- モジュール関数 (52)
- 定数 (44)
クラス
-
ARGF
. class (11) - Array (129)
- Bignum (3)
-
Encoding
:: Converter (22) - Enumerator (29)
-
Enumerator
:: ArithmeticSequence (6) -
Enumerator
:: Chain (12) -
Enumerator
:: Lazy (11) - File (55)
-
File
:: Stat (44) - Fixnum (3)
- Hash (22)
- Integer (22)
- MatchData (22)
- Method (44)
- Object (44)
- Proc (6)
- Random (26)
- Range (33)
-
RubyVM
:: InstructionSequence (33) - String (211)
- Struct (33)
- Symbol (22)
-
Thread
:: Queue (18) -
Thread
:: SizedQueue (111) - UnboundMethod (66)
モジュール
- FileTest (41)
- GC (22)
-
GC
:: Profiler (33) - Kernel (11)
- Process (22)
オブジェクト
- ENV (34)
キーワード
- << (15)
- == (22)
- ArgumentError (11)
- ConditionVariable (9)
- EMSGSIZE (11)
-
INTERNAL
_ CONSTANTS (11) - IO (11)
- Numeric (11)
- OPTS (11)
-
RLIMIT
_ FSIZE (11) -
RLIMIT
_ SBSIZE (11) - SizedQueue (18)
- Stat (11)
- String (11)
- [] (77)
- arity (22)
- binmode (11)
-
bit
_ length (11) - blksize (11)
- bsearch (44)
- byterindex (2)
- bytes (17)
- bytesize (11)
- clone (11)
- close (9)
- deq (9)
- disasm (11)
- disassemble (11)
-
each
_ grapheme _ cluster (14) -
each
_ index (22) - empty? (15)
- enq (9)
-
enum
_ for (22) - eql? (22)
- hash (22)
- length (93)
- max (9)
- max= (9)
- name (11)
- new (96)
- pack (19)
- pop (9)
-
primitive
_ convert (22) - push (9)
-
raw
_ data (11) -
raw
_ seed (2) - report (11)
- require (11)
- result (11)
- rindex (11)
- shift (9)
- size? (33)
- slice (66)
-
to
_ a (11) -
to
_ enum (22) -
to
_ h (12) - transpose (11)
- truncate (22)
- unpack (11)
- urandom (7)
- zero? (11)
検索結果
先頭5件
-
Thread
:: SizedQueue # size -> Integer (26103.0) -
キューの長さを返します。
キューの長さを返します。 -
MatchData
# size -> Integer (23125.0) -
部分文字列の数を返します(self.to_a.size と同じです)。
...部分文字列の数を返します(self.to_a.size と同じです)。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.size # => 4
//}... -
String
# size -> Integer (23121.0) -
文字列の文字数を返します。バイト数を知りたいときは bytesize メソッドを使ってください。
...いときは bytesize メソッドを使ってください。
//emlist[例][ruby]{
"test".length # => 4
"test".size # => 4
"テスト".length # => 3
"テスト".size # => 3
"\x80\u3042".length # => 2
"\x80\u3042".size # => 2
//}
@see String#bytesize... -
Hash
# size -> Integer (23115.0) -
ハッシュの要素の数を返します。
...ハッシュの要素の数を返します。
//emlist[][ruby]{
h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
h.length #=> 4
h.size #=> 4
h.delete("a") #=> 200
h.length #=> 3
h.size #=> 3
//}... -
Array
# size -> Integer (23109.0) -
配列の長さを返します。配列が空のときは 0 を返します。
...配列の長さを返します。配列が空のときは 0 を返します。
//emlist[例][ruby]{
p [1, nil, 3, nil].size #=> 4
//}... -
Symbol
# size -> Integer (23109.0) -
シンボルに対応する文字列の長さを返します。
...シンボルに対応する文字列の長さを返します。
(self.to_s.length と同じです。)
:foo.length #=> 3
@see String#length, String#size... -
ENV
. size -> Integer (23103.0) -
環境変数の数を返します。
環境変数の数を返します。 -
Struct
# size -> Integer (23103.0) -
構造体のメンバの数を返します。
構造体のメンバの数を返します。
[注意] 本メソッドの記述は Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
joe.length #=> 3
//} -
Thread
:: Queue # size -> Integer (23103.0) -
キューの長さを返します。
キューの長さを返します。
//emlist[例][ruby]{
q = Queue.new
[:resource1, :resource2, :resource3, nil].each { |r| q.push(r) }
q.length # => 4
//} -
File
:: Stat # size? -> Integer | nil (14121.0) -
サイズが0の時にはnil、それ以外の場合はファイルサイズを返します。
...はnil、それ以外の場合はファイルサイズを返します。
//emlist[][ruby]{
require 'tempfile'
fp = Tempfile.new("temp")
p fp.size #=> 0
p File::Stat.new(fp.path).size? #=> nil
fp.print "not 0 "
fp.close
p FileTest.exist?(fp.path) #=> true
p File::Stat.new(fp.path).size? #=> 6
//}... -
FileTest
. # size?(file) -> Integer | nil (14121.0) -
ファイルのサイズを返します。ファイルが存在しない時や ファイルのサイズが0の時には nil を返します。
...定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "test")
FileTest.size?("testfile") # => 4
File.delete("testfile")
FileTest.size?("testfile") # => nil
//}
@see FileTest.#size, FileTest.#zero?...