40件ヒット
[1-40件を表示]
(0.032秒)
ライブラリ
- ビルトイン (40)
クラス
- String (40)
キーワード
-
delete
_ prefix! (8) -
delete
_ suffix (8) -
delete
_ suffix! (8) -
start
_ with? (8)
検索結果
先頭5件
-
String
# delete _ prefix(prefix) -> String (18126.0) -
文字列の先頭から prefix を削除した文字列のコピーを返します。
...ます。
@param prefix 先頭から削除する文字列を指定します。
@return 文字列の先頭から prefix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_prefix("hel") # => "lo"
"hello".delete_prefix("llo") # => "hello"
//}
@see String#delete_prefix!
@see Strin... -
String
# delete _ prefix!(prefix) -> self | nil (6126.0) -
self の先頭から破壊的に prefix を削除します。
...します。
@param prefix 先頭から削除する文字列を指定します。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_prefix!("hel") # => "lo"
"hello".delete_prefix!("llo") # => nil
//}
@see String#delete_prefix
@see String#del... -
String
# start _ with?(*prefixes) -> bool (19.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...self の先頭が prefixes のいずれかであるとき true を返します。
@param prefixes パターンを表す文字列または正規表現 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_w......ith?("ing", "str") # => true
"string".start_with?(/\w/) # => true
"string".start_with?(/\d/) # => false
//}
@see String#end_with?
@see String#delete_prefix, String#delete_prefix!... -
String
# delete _ suffix!(suffix) -> self | nil (13.0) -
self の末尾から破壊的に suffix を削除します。
...self の末尾から破壊的に suffix を削除します。
@param suffix 末尾から削除する文字列を指定します。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_suffix!("llo") # => "he"
"hello".delete_suffix!("hel") # => n... -
String
# delete _ suffix(suffix) -> String (13.0) -
文字列の末尾から suffix を削除した文字列のコピーを返します。
...文字列の末尾から suffix を削除した文字列のコピーを返します。
@param suffix 末尾から削除する文字列を指定します。
@return 文字列の末尾から suffix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_suffix("llo") # => "he"
"hello"...