Loading...
Searching...
No Matches
number_format.h
Go to the documentation of this file.
1
7#pragma once
8#include <stddef.h>
9
14
25void number_group(char *buffer, size_t size, int value);
26
38void fmt_int_or_dash(char *buffer, size_t size, int value, const char *fmt);
39
51void fmt_hundredths(char *buffer, size_t size, int value);
52
64void fmt_pct_signed(char *buffer, size_t size, int value);
65
void fmt_int_or_dash(char *buffer, size_t size, int value, const char *fmt)
Format an integer, or "--" when there is no reading yet.
Definition number_format.c:67
void number_group(char *buffer, size_t size, int value)
Format an integer with apostrophe thousands separators (e.g. 20358 -> "20'358").
Definition number_format.c:27
void fmt_pct_signed(char *buffer, size_t size, int value)
Format hundredths as a signed two-decimal percent, e.g. 125 -> "+1.25%".
Definition number_format.c:89
void fmt_hundredths(char *buffer, size_t size, int value)
Format hundredths as a two-decimal number, e.g. 26174 -> "261.74".
Definition number_format.c:79