Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: None  |  size: 0.36 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. how to make all letters in the string capital?
  2. @encrypted_str = Digest::MD5.hexdigest("1a2b3c").capitalize
  3. =>Bf4ab447496f2d3d5a6c77c2cd12f996
  4.        
  5. @encrypted_str = Digest::MD5.hexdigest("1a2b3c").upcase
  6.        
  7. @encrypted_str = Digest::MD5.hexdigest("1a2b3c").upcase
  8. => "BF4AB447496F2D3D5A6C77C2CD12F996"
  9.        
  10. @encrypted_str = Digest::MD5.hexdigest("1a2b3c").upcase