aboutsummaryrefslogtreecommitdiff
path: root/sys/libfmt/locale.c
blob: 437c61e765f6fd4c092b5f58c60e15275b484afb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "internal.h"

void
fmt·setlocale(fmt·State *io, char *decimal, char *thousands, char *groups)
{
    if(decimal == nil || decimal[0] == '\0')
        decimal = ".";
    if(thousands == nil)
        thousands = ",";
    if(groups == nil)
        groups = "\3";

    io->groups    = groups;
    io->decimal   = decimal;
    io->thousands = thousands;
}