I have a string from MD5 that looks like this:
@encrypted_str = Digest::MD5.hexdigest("1a2b3c").capitalize
=>Bf4ab447496f2d3d5a6c77c2cd12f996
but this .capitalize is making capital only first letter B
advice me please how to capitalize all letters in this MD5 result
Look for the “Change Case” button on the Ribbon or use keyboard shortcuts after selecting text. In Word and Outlook for Windows hold SHIFT + F3 (tap to cycle) until the case you want is applied (if you have a laptop you may also need to hold the FN key).
In Python, upper() is a built-in method used for string handling. The upper() method returns the uppercased string from the given string. It converts all lowercase characters to uppercase.
upper() Return Value upper() method returns the uppercase string from the given string. It converts all lowercase characters to uppercase. If no lowercase characters exist, it returns the original string.
Try upcase:
@encrypted_str = Digest::MD5.hexdigest("1a2b3c").upcase
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With