mkcsrc: copy .c and .h file to avoid the break of the bootstrap
[nit.git] / c_src / standard___string._ffi.c
1 /*
2 Extern implementation of Nit module string
3 */
4 #include "standard___string._ffi.h"
5
6 #include <stdio.h>
7
8 String Float_to_precision_native___impl( float recv, bigint nb )
9 {
10 #line 830 "../lib/standard/string.nit"
11
12
13 int size;
14 char *str;
15
16 size = snprintf(NULL, 0, "%.*f", (int)nb, recv);
17 str = malloc(size + 1);
18 sprintf(str, "%.*f", (int)nb, recv );
19
20 return NativeString_to_s( str );
21 }