Skip to content

Instantly share code, notes, and snippets.

@nateberkopec
Created November 19, 2014 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nateberkopec/87114c2d2ae15a19cc62 to your computer and use it in GitHub Desktop.
Save nateberkopec/87114c2d2ae15a19cc62 to your computer and use it in GitHub Desktop.
def prepare_bodies(message)
messages = message.scan(/.{1,130}\b/)
return messages if messages.length == 1
messages.each_with_index.map do |s, i|
"(#{i + 1}/#{messages.length}) #{s}"
end
end
@aefreedman
Copy link

my body is ready?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment