0
0

More than 3 years have passed since last update.

Rubyで手を動かしてやったことまとめ

Last updated at Posted at 2020-03-14

書いた目的:いちいち探すのがめんどくさかったことをまとめてみた

詰まるたびに適宜更新する。

取得した文字列を1文字づつ分割して配列に入れたい

split関数で空文字を指定すると取得できる。
sample:

split_char.rb
str = "tukapai"
array = str.split("")
puts array 

output:

ruby split_char.rb                                                             
["t", "u", "k", "a", "p", "a", "i"]

その他自分でQiita記事で書いたリンク

【Ruby】条件分岐内で標準出力を使う方法

development/Ruby

0
0
2

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