116件ヒット
[101-116件を表示]
(0.077秒)
ライブラリ
- ビルトイン (116)
キーワード
- 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) -
start
_ with? (8) - unpack (12)
検索結果
-
String
# chop! -> self | nil (30104.0) -
文字列の最後の文字を取り除きます。 ただし、終端が "\r\n" であればその 2 文字を取り除きます。
...を取り除きます。
@return chop! は self を変更して返しますが、取り除く文字がなかった場合は nil を返します。
//emlist[例][ruby]{
str = "string\r\n"
ret = str.chop!
ret # => "string"
str # => "string"
str.chop! # =>......"strin"
"".chop! # => nil
//}
@see String#chomp!
@see String#chop
@see String#delete_suffix!... -
String
# end _ with?(*strs) -> bool (30104.0) -
self の末尾が strs のいずれかであるとき true を返します。
...。
@param strs パターンを表す文字列 (のリスト)
//emlist[例][ruby]{
"string".end_with?("ing") # => true
"string".end_with?("str") # => false
"string".end_with?("str", "ing") # => true
//}
@see String#start_with?
@see String#delete_suffix, String#delete_suffix... -
String
# unpack(template) -> Array (30098.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...アンパックし、
それらの要素を含む配列を返します。
@param template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack
のテンプレート文字の一覧です。テンプレート文......!<: little endian signed long
//}
=== 各テンプレート文字の説明
説明中、Array#pack と String#unpack で違いのあるものは `/' で区切って
「Array#pack の説明 / String#unpack の説明」としています。
: a
ASCII文字列(ヌル文字を詰める/後続する......jZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWg==".unpack("m0")
# => ["abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"]
//}
@see base64
: M
quoted-printable encoding された文字列
//emlist[][ruby]{
["a b c\td \ne"].pack("M") # => "a b c\td =\n\ne=\n"
"a b c\td =\n...