32件ヒット
[1-32件を表示]
(0.045秒)
種類
- インスタンスメソッド (21)
- 文書 (11)
ライブラリ
- ビルトイン (21)
クラス
- String (21)
キーワード
-
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) -
delete
_ prefix! (7) -
start
_ with? (7)
検索結果
先頭5件
-
String
# delete _ prefix(prefix) -> String (39244.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 (27191.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
# delete _ prefix!(prefix) -> self | nil (27143.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?... -
NEWS for Ruby 3
. 0 . 0 (270.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...", "f", 3]
in [*pre, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end
//}
* Endless method definition is added. [EXPERIMENTAL]
16746
//emlist{
def square(x) = x * x
//}
* Interpolated String literals are no lo...... String
* The following methods now return or yield String instances instead of subclass instances when called on subclass instances: 10845
* String#*
* String#capitalize
* String#center
* String#chomp
* String#chop
* String#delete
* String#delete_prefix......the request headers as a Hash in the second argument when the first argument is a URI. 16686
* Net::SMTP
* Add SNI support.
* Net::SMTP.start arguments are keyword arguments.
* TLS should not check the host name by default.
* OpenStruct
* Initialization is no longer lazy. 12136... -
NEWS for Ruby 2
. 5 . 0 (168.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...onSequence#trace_points を追加
* String
* String#-@ はフリーズされていない文字列の重複を排除します。
互換性のため、既にフリーズされている文字列には何もしません。 13077
* -"literal" (String#-@) は同じオブジェクトを......* String#casecmp, String#casecmp? に文字列でない引数を与えた場合、TypeErrorを発生させずにnilを返すようにしました
13312
* String#start_with? は正規表現を受け取れるようになりました 13712
* String#delete_prefix, String#delete_prefix!......を追加 12694
* String#delete_suffix, String#delete_suffix! を追加 13665
* String#each_grapheme_cluster, String#grapheme_clusters を追加。結合文字を列挙します。
13780
* String#undump を追加。String#dumpで出力した文字列を元に戻します。12275...