suve

awful: function: hex-case

Available since rev.34 (v.0.4.3).

Declaration

string :hex-case ( string $CASE )
string :hex-case

Summary

Sets the lettercase to be used when printing hex values or converting them to strings. Note that this controls only hex-to-string behaviour; string-to-hex will always accept both lowercase and uppercase A-F digits.

Value passed should be either (case-insensitively): lo, low, lower or lowercase for lowercase; up, upper or uppercase for uppercase. If it's not one of those strings (or omitted altogether), no change will be made.

Returns a string indicating the current case used - either lower or upper (default).

Example

# :hex-case example.
:set &hex h70abcd
:writeln s'Default:   ' $hex   # Should print 70ABCD

:hex-case s'lower'
:writeln s'Lowercase: ' $hex   # Should print 70abcd

:hex-case s'upper'
:writeln s'Uppercase: ' $hex   # Should print 70ABCD

wikipage modified on 2014/0601/2317