Skip to main content

Timeline for Generate ;# code

Current License: CC BY-SA 3.0

4 events
when toggle format what by license comment
May 23, 2017 at 8:45 history edited Chowlett CC BY-SA 3.0
added 81 characters in body
May 23, 2017 at 8:24 comment added Chowlett Your Ruby-fu exceeds mine, @manatwork - I'd forgotten about bytes. I've asked OP about newlines up top and will edit this afterwards.
May 23, 2017 at 8:19 comment added manatwork You could avoid the use of .ord by working directly with character codes: $_.bytes{|b|$><<?;*b+?#}. There is difference: this one also encodes the newline in the input. Not sure what the question owner intends to say by “It will only contain printable ASCII characters and newlines.”, but to me sounds like newlines should be encoded too.
May 23, 2017 at 7:56 history answered Chowlett CC BY-SA 3.0