From: Harry Kakueki Date: 2011-02-10T20:59:23+09:00 Subject: Re: How to split string by x bytes? On Thu, Feb 10, 2011 at 7:09 PM, Yan Bernacki wrote: > I have big string. > I want to get array of parts of strings (each 256 bytes). > What method is faster? > > -- I don't know if this is the fastest but.... You could try unpack. Modify it the way you want. str = "abcdefghijklmnopq" p str.unpack("a3"*(str.size/3)) Harry