5件ヒット
[1-5件を表示]
(0.106秒)
キーワード
-
delete
_ prefix (1) -
delete
_ prefix! (1) - scanf (2)
-
start
_ with? (1)
検索結果
先頭5件
-
String
# delete _ prefix!(prefix) -> self | nil (18607.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 _ prefix(prefix) -> String (18607.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
# start _ with?(*prefixes) -> bool (307.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
..."string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # => true
"string".start_with?(/\w/) # => true
"string".start_with?(/\d/) # => false
//}
@see String#end_with?
@see String#delete_prefix, String#d... -
String
# scanf(format) -> Array (43.0) -
ブロックを指定しない場合、見つかった文字列を format に従って変 換し、そのオブジェクトの配列を返します。 format で指定した文字列が見つからない場合は空の配列を 生成して返します。
...il], ["abc", 456], ["def", nil]]
@param format スキャンするフォーマットを文字列で指定します。
詳細は、m:String#scanf#format を参照してください。
使用例:
require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]......%a
: %A
符号付き浮動小数点数
: %s
空白文字を含まない文字列
(幅が指定されているときは指定された文字数か空白文字の直前までの短い方)
: %c
1文字(幅が指定されているときは指定された文字数)
: [...]
d:spec/regexp#string... -
String
# scanf(format) {|*ary| . . . } -> Array (43.0) -
ブロックを指定しない場合、見つかった文字列を format に従って変 換し、そのオブジェクトの配列を返します。 format で指定した文字列が見つからない場合は空の配列を 生成して返します。
...il], ["abc", 456], ["def", nil]]
@param format スキャンするフォーマットを文字列で指定します。
詳細は、m:String#scanf#format を参照してください。
使用例:
require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]......%a
: %A
符号付き浮動小数点数
: %s
空白文字を含まない文字列
(幅が指定されているときは指定された文字数か空白文字の直前までの短い方)
: %c
1文字(幅が指定されているときは指定された文字数)
: [...]
d:spec/regexp#string...