LoginSignup
0
0

More than 1 year has passed since last update.

配列と文字列の変換

Posted at

配列から文字列へ変換

irb(main):017:0>  ["1", "2", "3", "4"].join(",")
=> "1,2,3,4"

出典

文字列から配列へ変換

irb(main):018:0>   "1,2,3,4".split(",")
=> ["1", "2", "3", "4"]

出典

感想

基本だけど忘れていた。
使い所が出てきてよかった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0