Skip to content

Instantly share code, notes, and snippets.

@oceansize
Created July 2, 2014 08:30
Show Gist options
  • Save oceansize/7d604f95946c971ffae6 to your computer and use it in GitHub Desktop.
Save oceansize/7d604f95946c971ffae6 to your computer and use it in GitHub Desktop.
def find_ascii_of(val)
@numero = []
val.each_byte do |x|
@numero << x
end
return @numero
end
def convert
@numero.map! do |x|
x - 32 if (97..122).include? x
x.chr
end
@numero.join
end
def uppercasing(string)
find_ascii_of(string)
convert
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment