str.each_line(separator=$/) { |substr| block }: 根據字元分拆為不同次字串,預設使用\n。 "Time\nis\nmoney.".each_line{|c| puts c} ...
確定! 回上一頁