1712件ヒット
[1-100件を表示]
(0.036秒)
別のキーワード
ライブラリ
クラス
-
ARGF
. class (12) - Array (492)
- CGI (12)
-
CSV
:: Table (24) - Encoding (12)
- File (24)
- Hash (24)
- IO (36)
- Integer (24)
-
JSON
:: State (36) - MatchData (72)
-
Net
:: HTTPGenericRequest (24) -
REXML
:: Attributes (24) - Range (104)
- Set (24)
- String (24)
- Struct (24)
- Thread (24)
-
Thread
:: Queue (36)
モジュール
- Enumerable (268)
- GC (24)
- Kernel (60)
-
Net
:: HTTPHeader (120) - Readline (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Numeric (12)
- Ruby用語集 (12)
- [] (96)
- []= (36)
- at (12)
-
backtrace
_ locations (24) - binread (12)
-
bit
_ length (12) -
body
_ stream (12) -
body
_ stream= (12) - caller (36)
-
caller
_ locations (24) - cgi (12)
- chunk (12)
-
chunk
_ while (12) - clear (12)
- combination (24)
-
content
_ length (12) -
content
_ length= (12) -
content
_ range (12) -
copy
_ stream (24) - delete (12)
- dummy? (12)
- fetch (36)
- fill (72)
-
get
_ fields (12) - header (12)
- max (82)
-
max
_ by (48) - min (82)
-
min
_ by (48) - minmax (48)
-
minmax
_ by (24) - new (12)
- none? (53)
- one? (53)
- permutation (24)
-
range
_ length (12) - read (12)
- readline (12)
-
repeated
_ combination (24) -
repeated
_ permutation (24) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
ruby
_ stack _ length (12) - sample (48)
- size (120)
-
slice
_ before (24) -
slice
_ when (12) -
sort
_ by! (24) - stat (24)
- sum (18)
-
to
_ h (12) -
to
_ hash (12) - truncate (24)
- tsort (12)
-
webrick
/ cgi (12) - 制御構造 (12)
検索結果
先頭5件
-
int ruby
_ stack _ length(VALUE **p) (32200.0) -
-
String
# length -> Integer (18125.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... -
CSV
:: Table # length -> Integer (18119.0) -
(ヘッダを除く)行数を返します。
...(ヘッダを除く)行数を返します。
Array#length, Array#size に委譲しています。
//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.size # => 1
//}
@see Array#length, Array#size... -
Hash
# length -> Integer (18119.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
//}... -
REXML
:: Attributes # length -> Integer (18113.0) -
属性の個数を返します。
...ます。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p a.attributes.length # => 3
//}... -
Struct
# length -> Integer (18113.0) -
構造体のメンバの数を返します。
...に対して呼び
出す事を想定しています。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 # length -> Integer (18113.0) -
キューの長さを返します。
...キューの長さを返します。
//emlist[例][ruby]{
require 'thread'
q = Queue.new
[:resource1, :resource2, :resource3, nil].each { |r| q.push(r) }
q.length # => 4
//}......キューの長さを返します。
//emlist[例][ruby]{
q = Queue.new
[:resource1, :resource2, :resource3, nil].each { |r| q.push(r) }
q.length # => 4
//}... -
Array
# length -> Integer (18107.0) -
配列の長さを返します。配列が空のときは 0 を返します。
...配列の長さを返します。配列が空のときは 0 を返します。
//emlist[例][ruby]{
p [1, nil, 3, nil].size #=> 4
//}... -
MatchData
# length -> Integer (18107.0) -
部分文字列の数を返します(self.to_a.size と同じです)。
...部分文字列の数を返します(self.to_a.size と同じです)。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.size # => 4
//}...