Showing posts with label ruby. Show all posts
Showing posts with label ruby. Show all posts

Ruby: Joining unpacked integers with strings

Posted: Saturday, 5 January 2013

If you're a novice at ruby like me, you've probably tried to join strings using plus signs when the data has been unpacked using .unpack():
no="1234"
no=no.unpack('N')
print "This number will not display: " + no