From: Stu Date: 2013-07-08T08:38:46+09:00 Subject: Re: How can I make ruby read a string of characters per three characters? --089e012284fa941c8b04e0f46dc9 Content-Type: text/plain; charset=ISO-8859-1 need to loop it as well and do the test on input keeping count if I'm reading this correct. while is a good option or ruby has an abstraction of the construct called interestingly enough loop{ } ~Stu On Sat, Jul 6, 2013 at 2:32 AM, Joel Pearson wrote: > Here's an option: > > "a testy string of testyness".split('').each_slice(3) do |s| > puts s.join > end > > -- > Posted via http://www.ruby-forum.com/. > > --089e012284fa941c8b04e0f46dc9 Content-Type: text/html; charset=ISO-8859-1
need to loop it as well and do the test on input keeping count if I'm reading this correct.

while is a good option or ruby has an abstraction of the construct called interestingly enough loop{ }

~Stu



On Sat, Jul 6, 2013 at 2:32 AM, Joel Pearson <lists@ruby-forum.com> wrote:
Here's an option:

"a testy string of testyness".split('').each_slice(3) do |s|
puts s.join
end

--089e012284fa941c8b04e0f46dc9--