def totsusan( words = "LOOPY BROAD", guy = "凸(・`Д・´o)" )
words.upcase!
words = words.tr('A-Z0-9\'', 'A-Z0-9’')
wordarray = words.split(' ')
guy = guy.toutf8
# chunk is some generic helper crap to split an array into n pieces with as equal a number of elements as possible
# figure it out
left, right = *wordarray.chunk(2)
# note that fullwidth spaces are used here
totsusanstring = left.join(' ') + "━━━" + guy + "━━━" + right.join(' ')
return totsusanstring
end
I would like to take this time to point out that Ruby is kind of weird
THIS CODE IS HEREBY RELEASED UNDER THE CREATIVE COMMONS NONCOMMERCIAL SHno
no subject
Date: 2007-09-24 08:16 pm (UTC)no subject
Date: 2007-09-24 11:36 pm (UTC)I do not like the idea that punctuation can be part of method names. Dumb. I also don't like the thing where functions can get called implicitly without parentheses. I like Ruby sometimes but sometimes it smells like orange spider nipples.
no subject
Date: 2007-09-24 11:46 pm (UTC)the whole underlying mechanics and the implementation are damn nuts though
no subject
Date: 2007-09-25 12:20 am (UTC)no subject
Date: 2007-09-26 06:41 am (UTC)the footprint of that script is about 132k
132k
no subject
Date: 2007-09-26 06:42 am (UTC)wooooop