Flowdock
limit(limit) public

Limits the byte size of the string to a number of bytes without breaking characters. Usable when the storage for a string is limited for some reason.

'こんにちは'.mb_chars.limit(7).to_s # => "こん"
Show source
Register or log in to add new notes.