2011-09-22から1日間の記事一覧

指定した長さの文字列を生成する

10.times.inject("") {|str| str << "a" }.size # 10 "".center(10, "a").size # 10 ("a" * 10).size # 10