647件ヒット
[1-100件を表示]
(0.132秒)
別のキーワード
キーワード
- % (12)
- [] (72)
- byteindex (3)
- byterindex (3)
- bytesplice (5)
- casecmp (12)
- casecmp? (9)
- center (12)
- codepoints (24)
- dedup (3)
- delete (12)
- delete! (12)
-
delete
_ prefix (8) -
delete
_ prefix! (8) - downcase (12)
- downcase! (12)
- dump (12)
-
each
_ codepoint (24) - encode (36)
- encode! (24)
-
force
_ encoding (12) - gsub (12)
- gsub! (12)
- index (12)
- ljust (12)
- match (12)
- ord (12)
- pathmap (12)
-
pathmap
_ explode (12) - prepend (21)
- rindex (12)
- rjust (12)
- scanf (12)
- slice (72)
- split (19)
-
start
_ with? (8) - sub (12)
- sub! (12)
-
to
_ i (12) - tr (12)
- undump (8)
- unpack (12)
検索結果
先頭5件
-
String
# codepoints {|codepoint| block } -> self (12402.0) -
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
..._codepoint.to_a と同じです)
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}
ブロックが指定された場合は String#each_codepoint と同じように動作します。
Ruby 2.6 までは deprecated......の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_codepoint... -
String
# each _ codepoint {|codepoint| block } -> self (12402.0) -
文字列の各コードポイントに対して繰り返します。
...ます。
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
"hello わーるど".encode('euc-jp').each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 42223, 41404, 42219, 42185]
//}
@see String#codepoints... -
String
# delete _ prefix!(prefix) -> self | nil (12302.0) -
self の先頭から破壊的に prefix を削除します。
... prefix を削除します。
@param prefix 先頭から削除する文字列を指定します。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_prefix!("hel") # => "lo"
"hello".delete_prefix!("llo") # => nil
//}
@see String#delete_prefi......x
@see String#delete_suffix!
@see String#start_with?... -
String
# delete _ prefix(prefix) -> String (12302.0) -
文字列の先頭から prefix を削除した文字列のコピーを返します。
...から prefix を削除した文字列のコピーを返します。
@param prefix 先頭から削除する文字列を指定します。
@return 文字列の先頭から prefix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_prefix("hel") # => "lo"
"hello".delete_prefix("ll......o") # => "hello"
//}
@see String#delete_prefix!
@see String#delete_suffix
@see String#start_with?... -
String
# dump -> String (12208.0) -
文字列中の非表示文字をバックスラッシュ記法に置き換えた文字列を返します。 str == eval(str.dump) となることが保証されています。
...に置き換えた文字列を返します。
str == eval(str.dump) となることが保証されています。
//emlist[例][ruby]{
# p だとさらにバックスラッシュが増えて見にくいので puts している
puts "abc\r\n\f\x00\b10\\\"".dump # => "abc\r\n\f\x00\b10\\\""
//}......文字列を返します。
str == eval(str.dump) となることが保証されています。
//emlist[例][ruby]{
# p だとさらにバックスラッシュが増えて見にくいので puts している
puts "abc\r\n\f\x00\b10\\\"".dump # => "abc\r\n\f\x00\b10\\\""
//}
@see String#undump... -
String
# codepoints -> [Integer] (12202.0) -
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
..._codepoint.to_a と同じです)
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}
ブロックが指定された場合は String#each_codepoint と同じように動作します。
Ruby 2.6 までは deprecated......の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_codepoint... -
String
# each _ codepoint -> Enumerator (12202.0) -
文字列の各コードポイントに対して繰り返します。
...ます。
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
"hello わーるど".encode('euc-jp').each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 42223, 41404, 42219, 42185]
//}
@see String#codepoints... -
String
# pathmap _ explode -> Array (12202.0) -
自身をパスを表す部分ごとに分解して配列にして返します。 String#pathmap で利用される protected メソッドです。
...自身をパスを表す部分ごとに分解して配列にして返します。
String#pathmap で利用される protected メソッドです。
@see String#pathmap... -
String
# prepend(*arguments) -> String (12202.0) -
複数の文字列を先頭に破壊的に追加します。
...列を先頭に破壊的に追加します。
@param arguments 追加したい文字列を指定します。
//emlist[例][ruby]{
a = "!!!"
a.prepend # => "!!!"
a # => "!!!"
a = "!!!"
a.prepend "hello ", "world" # => "hello world!!!"
a # => "hello world!!!"
//}... -
String
# prepend(other _ str) -> String (12202.0) -
文字列 other_str を先頭に破壊的に追加します。
...文字列 other_str を先頭に破壊的に追加します。
@param other_str 追加したい文字列を指定します。
//emlist[例][ruby]{
a = "world"
a.prepend("hello ") # => "hello world"
a # => "hello world"
//}...