c_src: update to have intern args
[nit.git] / c_src / standard___string._ffi.c
diff --git a/c_src/standard___string._ffi.c b/c_src/standard___string._ffi.c
new file mode 100644 (file)
index 0000000..c2cf002
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+       Extern implementation of Nit module string
+*/
+#include "standard___string._ffi.h"
+
+String Float_to_precision_native___impl( float recv, bigint nb )
+{
+#line 826 "../lib/standard/string.nit"
+
+
+               int size;
+               char *str;
+
+               size = snprintf(NULL, 0, "%.*f", (int)nb, recv);
+               str = malloc(size + 1);
+               sprintf(str, "%.*f", (int)nb, recv );
+
+               return new_String_from_cstring( str );
+       }