Class: String
Instance Method Summary collapse
Instance Method Details
#to_md5 ⇒ Object
54 55 56 |
# File 'lib/sh_util.rb', line 54 def to_md5 return (Digest::MD5.new << self).to_s end |
#to_u ⇒ Object
58 59 60 61 62 63 64 65 |
# File 'lib/sh_util.rb', line 58 def to_u if is_binary_data? return isutf8 ? self : nil else utf8 = isutf8 return utf8 ? utf8.to_s : unpack('C*').pack('U*') end end |