%d,%c,%s,%x each represents weare

2022-12-31   ES  

conversion instructions
%A ( %A) floating point number, hexadecimal number, and P- (P-) counting method (C99)
%C character
%D has a symbol decimal integer
%F floating point number (including Float and DOULBE)
%E ( %E) Floating point number index output [E- (E-) counting method]
%g ( %g) floating point number is not meaningful zero "0"
%I have symbol decimal integers (the same as %d)
%U non -symbol decimal integer
%O octagonal integer E.G. 0123
%x ( %x) hexadecimal integer 0F (0) E.G. 0x1234
%P pointer
%s string
%% "%"

2 `logo
Left alignment: "-" e.g. "%-20s"
Right alignment: "+" e.g. "%+20s"
Space: If the symbol is positive, the space is displayed, and the negative shows "- "e.g."% 6.2F "
#: There is no impact on C, S, D, U; add prefix O during the output to class O. For X, add prefix 0x when output;
By, G, F The decimal point when there are decimal results.

3. Format string (format)
〔Logo〕 [At least the output at least width] [. Accuracy] [length] type
" % -md": Left alignment, if M is less than actual, output according to actual.
"%m.ns": Output m bit, take the string (from left) n bit, left the space, when n> m or m is omitted, m = n
e.g. "%7.2s" enter china
Output "CH"
"%m.nf": output floating point number, m is width, n is the decimal point to the right of the number
e.g. "%3.1F" input 3852.99
Output 3853.0
length: short plastic amount of H, L for long plastic surgery


Random Posts

SpringCloud detailed explanation


[java] Use Eclipse from download to writing an instance full process


Through JNI to implement dialog box Flight