Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4485819
numbers.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
752 B
Referenced Files
None
Subscribers
None
numbers.h
View Options
#ifndef ANT_NUMBER_CONVERSION_H
#define ANT_NUMBER_CONVERSION_H
#include
<stdbool.h>
#include
<stddef.h>
#ifdef __cplusplus
extern
"C"
{
#endif
typedef
enum
{
ANT_NUMBER_PARSE_DECIMAL
,
ANT_NUMBER_PARSE_JS_NUMBER
,
ANT_NUMBER_PARSE_FLOAT_PREFIX
,
}
ant_number_parse_mode_t
;
bool
ant_number_parse
(
const
char
*
str
,
size_t
len
,
ant_number_parse_mode_t
mode
,
double
*
out
,
size_t
*
processed
);
size_t
ant_number_to_shortest
(
double
value
,
char
*
buf
,
size_t
len
);
size_t
ant_number_to_fixed
(
double
value
,
int
digits
,
char
*
buf
,
size_t
len
);
size_t
ant_number_to_precision
(
double
value
,
int
precision
,
char
*
buf
,
size_t
len
);
size_t
ant_number_to_exponential
(
double
value
,
int
digits
,
char
*
buf
,
size_t
len
);
#ifdef __cplusplus
}
#endif
#endif
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, May 3, 2:29 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
544852
Default Alt Text
numbers.h (752 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment