るりまサーチ

最速Rubyリファレンスマニュアル検索!
23件ヒット [1-23件を表示] (0.120秒)
トップページ > クエリ:string[x] > クエリ:tr[x] > クエリ:a[x] > クエリ:prepend[x]

別のキーワード

  1. matrix tr
  2. string tr
  3. string tr!
  4. string tr_s!
  5. string tr_s

ライブラリ

クラス

検索結果

String#prepend(*arguments) -> String (30456.0)

複数の文字列を先頭に破壊的に追加します。

...字列を先頭に破壊的に追加します。

@param arguments 追加したい文字列を指定します。

//emlist[例][ruby]{
a
= "!!!"
a
.prepend # => "!!!"
a
# => "!!!"

a
= "!!!"
a
.prepend "hello ", "world" # => "hello world!!!"
a
# => "hello world!!!"
//...

String#prepend(other_str) -> String (30436.0)

文字列 other_str を先頭に破壊的に追加します。

...文字列 other_str を先頭に破壊的に追加します。

@param other_str 追加したい文字列を指定します。

//emlist[例][ruby]{
a
= "world"
a
.prepend("hello ") # => "hello world"
a
# => "hello world"
//}...

NEWS for Ruby 3.0.0 (738.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...word arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now match...
...{
0 => a
p a #=> 0

{b: 0, c: 1} => {b:}
p b #=> 0
//}

//emlist{
# version 3.0
0 in 1 #=> false

# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}

* Find-pattern is added. [EXPERIMENTAL]
16828

//emlist{
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
in [*pre, String => x, String => y...
...` and `1` for `__LINE__` in the evaluated code. 4352
* Kernel#lambda now warns if called without a literal block. 15973
* Kernel.sleep invokes the scheduler hook `#kernel_sleep(...)` in a non-blocking execution context. 16786
* Module
* Module#include and Module#prepend now affect clas...