108件ヒット
[1-100件を表示]
(0.101秒)
クラス
-
CSV
:: FieldInfo (12) - Enumerator (12)
- MatchData (24)
-
OpenSSL
:: X509 :: Name (12) - String (48)
キーワード
- bytes (24)
- codepoints (24)
- length (12)
- line (12)
- size (24)
検索結果
先頭5件
-
OpenSSL
:: X509 :: Name # to _ a -> [[String , String , Integer]] (18209.0) -
内容を配列にして返します。
...ssl'
n = OpenSSL::X509::Name.parse('/C=JP/ST=Kanagawa/L=Yokohama/O=Example Company/OU=Lab3/CN=foobar/emailAddress=foobar@lab3.example.co.jp')
n.to_a
# => [["C", "JP", 19], ["ST", "Kanagawa", 12], ["L", "Yokohama", 12], ["O", "Example Company", 12], ["OU", "Lab3", 12], ["CN", "foobar", 12], ["e... -
MatchData
# length -> Integer (119.0) -
部分文字列の数を返します(self.to_a.size と同じです)。
...部分文字列の数を返します(self.to_a.size と同じです)。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.size # => 4
//}... -
MatchData
# size -> Integer (119.0) -
部分文字列の数を返します(self.to_a.size と同じです)。
...部分文字列の数を返します(self.to_a.size と同じです)。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.size # => 4
//}... -
String
# bytes -> [Integer] (118.0) -
文字列の各バイトを数値の配列で返します。(self.each_byte.to_a と同じです)
...文字列の各バイトを数値の配列で返します。(self.each_byte.to_a と同じです)
//emlist[例][ruby]{
"str".bytes # => [115, 116, 114]
//}
ブロックが指定された場合は String#each_byte と同じように動作します。
Ruby 2.6 までは deprecated の警告が出... -
String
# codepoints -> [Integer] (118.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_codep... -
CSV
:: FieldInfo # line -> Integer (108.0) -
行番号を返します。
...\n2018-07-09,2018-07-10\n2018-08-09,2018-08-10", headers: true)
csv.convert do |field,field_info|
p field_info.line
Date.parse(field)
end
p csv.to_a
# => 2
# => 2
# => 3
# => 3
# => [#<CSV::Row "date1":#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,2299161j)> "date2":#<Date: 2018-07-10 ((2458310j,0s,... -
Enumerator
# size -> Integer | Float :: INFINITY | nil (108.0) -
self の要素数を返します。
...いた場合はその
実行結果を返します。呼び出した時に要素数が不明であった場合は nil を返し
ます。
//emlist[例][ruby]{
(1..100).to_a.permutation(4).size # => 94109400
loop.size # => Float::INFINITY
(1..100).drop_while.size # => nil
//}
@see Enumerator.new... -
String
# bytes {|byte| . . . } -> self (18.0) -
文字列の各バイトを数値の配列で返します。(self.each_byte.to_a と同じです)
...文字列の各バイトを数値の配列で返します。(self.each_byte.to_a と同じです)
//emlist[例][ruby]{
"str".bytes # => [115, 116, 114]
//}
ブロックが指定された場合は String#each_byte と同じように動作します。
Ruby 2.6 までは deprecated の警告が出... -
String
# codepoints {|codepoint| block } -> self (18.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_codep...