• Thorben Krueger's avatar
    fmt: Add support for capital '%X' format verb for scanning · 26fe24cb
    Thorben Krueger authored
    For printing, the format verb '%X' results in a capitalized
    hex-representation of the formatted value. Conversely, using
    '%X' in a Scanf function should scan a hex-representation
    into the given interface{}. The existing implementation
    however only supports '%X' for scanning hex values into
    integers; strings or byte slices remain empty. On the other
    hand, lower-case '%x' supports strings and byte slices just
    fine. This is merely an oversight, which this commit fixes.
    (Additional tests also included.)
    
        Fixes #12940
    
    Change-Id: I178a7f615bae950dfc014ca8c0a038448cf0452a
    Reviewed-on: https://go-review.googlesource.com/15689Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
    26fe24cb
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...