303件ヒット
[1-100件を表示]
(0.054秒)
別のキーワード
種類
- インスタンスメソッド (149)
- 文書 (94)
- 特異メソッド (36)
- ライブラリ (24)
クラス
- Array (21)
- String (116)
-
WIN32OLE
_ VARIANT (12)
モジュール
-
Net
:: HTTPHeader (12)
オブジェクト
- ENV (24)
キーワード
-
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) - cgi (12)
- chomp (8)
- chomp! (8)
- chop (8)
- chop! (8)
- delete! (12)
-
delete
_ prefix (8) -
delete
_ prefix! (8) -
delete
_ suffix (8) -
delete
_ suffix! (8) -
end
_ with? (8) - new (12)
- pack (21)
- pack テンプレート文字列 (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
start
_ with? (8) - unpack (12)
-
webrick
/ cgi (12)
検索結果
先頭5件
-
String
# delete(*strs) -> String (27232.0) -
self から strs に含まれる文字を取り除いた文字列を生成して返します。
...合は、
すべての引数にマッチする文字だけが削除されます。
@param strs 削除する文字列を示す文字列 (のリスト)
//emlist[例][ruby]{
p "123456789".delete("2378") #=> "14569"
p "123456789".delete("2-8", "^4-6") #=> "14569"
//}
@see String#delete!... -
ENV
. delete(key) -> String | nil (18222.0) -
key に対応する環境変数を取り除きます。取り除かれた環境変数の 値を返しますが、key に対応する環境変数が存在しない時には nil を返します。
...字列以外のオブジェクトを指定した場合は to_str メソッド
による暗黙の型変換を試みます。
//emlist[][ruby]{
ENV['TEST'] = 'foo'
ENV.delete('TEST') # => "foo"
ENV.delete('TEST') { |key| puts "#{key} is not found in ENV" } # TEST is not found in ENV
//}... -
ENV
. delete(key) {|key| . . . } -> String | nil (18222.0) -
key に対応する環境変数を取り除きます。取り除かれた環境変数の 値を返しますが、key に対応する環境変数が存在しない時には nil を返します。
...字列以外のオブジェクトを指定した場合は to_str メソッド
による暗黙の型変換を試みます。
//emlist[][ruby]{
ENV['TEST'] = 'foo'
ENV.delete('TEST') # => "foo"
ENV.delete('TEST') { |key| puts "#{key} is not found in ENV" } # TEST is not found in ENV
//}... -
Net
:: HTTPHeader # delete(key) -> [String] | nil (18214.0) -
key ヘッダフィールドを削除します。
...合には
nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length = 10
req.content_length # => 10
req.delete("Content-Length") # => ["10"]
req.content_length # => nil... -
String
# delete _ suffix(suffix) -> String (15262.0) -
文字列の末尾から suffix を削除した文字列のコピーを返します。
...。
@return 文字列の末尾から suffix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_suffix("llo") # => "he"
"hello".delete_suffix("hel") # => "hello"
//}
@see String#chomp
@see String#chop
@see String#delete_prefix
@see String#delete_suffix!
@see String#end_with?... -
String
# delete _ prefix(prefix) -> String (15250.0) -
文字列の先頭から prefix を削除した文字列のコピーを返します。
...する文字列を指定します。
@return 文字列の先頭から prefix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_prefix("hel") # => "lo"
"hello".delete_prefix("llo") # => "hello"
//}
@see String#delete_prefix!
@see String#delete_suffix
@see String#start_with?... -
String
# delete _ suffix!(suffix) -> self | nil (15161.0) -
self の末尾から破壊的に suffix を削除します。
...ます。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_suffix!("llo") # => "he"
"hello".delete_suffix!("hel") # => nil
//}
@see String#chomp!
@see String#chop!
@see String#delete_prefix!
@see String#delete_suffix
@see String#end_with?... -
String
# delete _ prefix!(prefix) -> self | nil (15149.0) -
self の先頭から破壊的に prefix を削除します。
...ら削除する文字列を指定します。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_prefix!("hel") # => "lo"
"hello".delete_prefix!("llo") # => nil
//}
@see String#delete_prefix
@see String#delete_suffix!
@see String#start_with?... -
String
# delete!(*strs) -> self | nil (15137.0) -
self から strs に含まれる文字を破壊的に取り除きます。
...(のリスト)
//emlist[例][ruby]{
str = "123456789"
p str.delete!("2378") #=> "14569"
p str #=> "14569"
str = "123456789"
p str.delete!("2-8", "^4-6") #=> "14569"
p str #=> "14569"
str = "abc"
p str.delete!("2378") #=> "nil"
p st......r #=> "abc"
//}
@see String#delete... -
String
# unpack(template) -> Array (9630.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...m template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることがで......明中、Array#pack と String#unpack で違いのあるものは `/' で区切って
「Array#pack の説明 / String#unpack の説明」としています。
: a
ASCII文字列(ヌル文字を詰める/後続するヌル文字やスペースを残す)
//emlist[][ruby]{
["abc"].pack("a") # =......[][ruby]{
[82, 117, 98, 121].pack("ccxxcc") # => "Ru\x00\x00by"
//}
: "x" で文字を読み飛ばす事が出来る
//emlist[][ruby]{
"Ru\x00\x00by".unpack('ccxxcc') # => [82, 117, 98, 121]
//}
: Hexダンプを数値の配列に変換する例
//emlist[][ruby]{
"61 62 63 64 65 66".delete('...