|
XWOS API
4.0
XWOS C/C++ API参考手册
|
XWOS通用库:格式化字符串 更多...
#include <xwos/standard.h>#include <string.h>#include <ctype.h>#include <stddef.h>#include <math.h>#include <float.h>#include <xwos/lib/div64.h>
结构体 | |
| struct | xwvsnpf_format_spec |
宏定义 | |
| #define | XWVSNPF_F_ZEROPAD 0x01 |
| #define | XWVSNPF_F_SIGN 0x02 |
| #define | XWVSNPF_F_PLUS 0x04 |
| #define | XWVSNPF_F_SPACE 0x08 |
| #define | XWVSNPF_F_LEFT 0x10 |
| #define | XWVSNPF_F_SMALL 0x20 |
| #define | XWVSNPF_F_SPECIAL 0x40 |
函数 | |
| static int | xwvsnpf_skip_atoi (const char **s) |
| static char * | xwvsnpf_put_dec_trunc (char *buf, unsigned int q) |
| static char * | xwvsnpf_put_dec_full (char *buf, unsigned int q) |
| static char * | xwvsnpf_put_dec (char *buf, unsigned long long num) |
| static char * | xwvsnpf_format_number (char *buf, char *end, xwu64_t num, struct xwvsnpf_format_spec spec) |
| static void | xwvsnpf_format_move_right (char *buf, char *end, xwssz_t len, xwssz_t spaces) |
| static char * | xwvsnpf_format_widen_string (char *buf, xwssz_t n, char *end, struct xwvsnpf_format_spec spec) |
| static char * | xwvsnpf_format_string_nocheck (char *buf, char *end, const char *s, struct xwvsnpf_format_spec spec) |
| static char * | xwvsnpf_format_string (char *buf, char *end, const char *s, struct xwvsnpf_format_spec spec) |
| static char * | xwvsnpf_format_pointer (const char *fmt, char *buf, char *end, void *ptr, struct xwvsnpf_format_spec spec) |
| static char * | xwvsnpf_put_float_decimal (char *buf, char *end, unsigned long long num, int digits) |
| static char * | xwvsnpf_format_float (char *buf, char *end, double num, struct xwvsnpf_format_spec spec) |
| static char * | xwvsnpf_format_long_double (char *buf, char *end, long double num, struct xwvsnpf_format_spec spec) |
| static int | xwvsnpf_format_decode (const char *fmt, struct xwvsnpf_format_spec *spec) |
| int | xwvsnpf (char *buf, xwsz_t size, const char *fmt, va_list args) |
| 格式化字符串(同vsnprintf) | |
| int | xwsnpf (char *buf, xwsz_t size, const char *fmt,...) |
| 格式化字符串(同snprintf) | |
| int | xwvspf (char *buf, const char *fmt, va_list args) |
| 格式化字符串(同vsprintf) | |
| int | xwspf (char *buf, const char *fmt,...) |
| 格式化字符串(同sprintf) | |
变量 | |
| static const char | xwvsnpf_digits [] = "0123456789ABCDEF" |
| static const char | xwvsnpf_nullstr [] = "(null)" |
XWOS通用库:格式化字符串
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
在文件 xwspf.c 中定义.
|
inlinestatic |
|
inlinestatic |

|
inlinestatic |

|
inlinestatic |


|
inlinestatic |
< leading flag:0x
< Must be 32 == 0x20
< left justified
< pad with zero
< unsigned/signed long
< show plus
< space if plus
< pad with zero
< left justified
< left justified
< pad with zero


|
inlinestatic |
|
inlinestatic |
< left justified


|
inlinestatic |


|
inlinestatic |


|
inlinestatic |
< leading flag:0x
< Must be 32 == 0x20
< pad with zero


|
inlinestatic |

|
inlinestatic |
< Must be 32 == 0x20
< show plus
< space if plus
< leading flag:0x
< left justified
< pad with zero
< left justified


|
inlinestatic |
< Must be 32 == 0x20
< show plus
< space if plus
< leading flag:0x
< left justified
< pad with zero
< left justified


|
inlinestatic |
< left justified
< left justified
< show plus
< space if plus
< leading flag:0x
< pad with zero
< Must be 32 == 0x20
< Must be 32 == 0x20
< Must be 32 == 0x20
< unsigned/signed long
< unsigned/signed long
< unsigned/signed long
< unsigned/signed long
< unsigned/signed long

