39 #define _STRINGLIB_H 1 52 vector < string >
string_split(
string in,
string delimeters);
53 uint16_t
string_parse(
char *
string,
char *word[], uint16_t size);
54 int string_cmp(
const char *wild,
const char *
string);
57 string to_hex(int64_t value, uint16_t digits=0,
bool zerofill=
false);
58 string to_signed(int64_t value, uint16_t digits=0,
bool zerofill=
false);
59 string to_unsigned(uint64_t value, uint16_t digits=0,
bool zerofill=
false);
60 string to_double(
double value, uint16_t precision=0);
61 string to_mjd(
double value);
62 string to_temperature(
double value,
char units=
'K', uint8_t precision=4);
63 string to_angle(
double value,
char units=
'R', uint8_t precision=4);
65 string to_json(
string key,
string value);
66 string to_json(
string key,
double value);
67 string to_json(
string key, int64_t value);
68 string to_json(
string key, int32_t value);
69 string to_json(
string key, int16_t value);
70 string to_json(
string key, int8_t value);
71 string to_json(
string key, uint64_t value);
72 string to_json(
string key, uint32_t value);
73 string to_json(
string key, uint16_t value);
74 string to_json(
string key, uint8_t value);
75 string to_label(
string label,
string value);
76 string to_label(
string label,
double value, uint16_t precision=0,
bool mjd=
false);
77 string to_label(
string label, int64_t value, uint16_t digits=0,
bool hex=
false);
78 string to_label(
string label, int32_t value, uint16_t digits=0,
bool hex=
false);
79 string to_label(
string label, int16_t value, uint16_t digits=0,
bool hex=
false);
80 string to_label(
string label, int8_t value, uint16_t digits=0,
bool hex=
false);
81 string to_label(
string label, uint64_t value, uint16_t digits=0,
bool hex=
false);
82 string to_label(
string label, uint32_t value, uint16_t digits=0,
bool hex=
false);
83 string to_label(
string label, uint16_t value, uint16_t digits=0,
bool hex=
false);
84 string to_label(
string label, uint8_t value, uint16_t digits=0,
bool hex=
false);
85 string to_label(
string label,
bool value);
double getFieldNumberAsDouble(uint32_t index)
Definition: stringlib.cpp:184
string to_temperature(double value, char units, uint8_t precision)
Definition: stringlib.cpp:300
void splitString(string str, char delimiter)
Definition: stringlib.cpp:150
string to_string(char *value)
Definition: stringlib.cpp:220
string to_unsigned(uint64_t value, uint16_t digits, bool zerofill)
Definition: stringlib.cpp:265
const string & str
Definition: json11.cpp:360
vector< string > vect
Definition: stringlib.h:91
string to_signed(int64_t value, uint16_t digits, bool zerofill)
Definition: stringlib.cpp:245
string to_hex_string(vector< uint8_t > buffer, bool ascii)
Definition: stringlib.cpp:204
size_t numberOfFields
Definition: stringlib.h:103
static char buffer[255]
Definition: propagator_simple.cpp:60
int getFieldNumberAsInteger(uint32_t index)
Definition: stringlib.cpp:202
Headers and definitions common to all COSMOS.
double mjd
Definition: udp_send.cpp:41
uint16_t string_parse(char *string, char *words[], uint16_t wmax)
Parse a string into words.
Definition: stringlib.cpp:78
Definition: stringlib.h:89
string getFieldNumber(uint32_t index)
Definition: stringlib.cpp:170
string to_bool(bool value)
Definition: stringlib.cpp:326
string clean_string(string value)
Definition: stringlib.cpp:432
string to_hex(int64_t value, uint16_t digits, bool zerofill)
Definition: stringlib.cpp:225
int offset
Definition: stringlib.h:97
StringParser(string str)
Definition: stringlib.cpp:143
int string_cmp(const char *wild, const char *string)
Definition: stringlib.cpp:110
string to_label(string label, double value, uint16_t precision, bool mjd)
Definition: stringlib.cpp:376
string to_json(string key, string value)
Definition: stringlib.cpp:334
string to_mjd(double value)
Definition: stringlib.cpp:298
string to_angle(double value, char units, uint8_t precision)
Definition: stringlib.cpp:313
string to_double(double value, uint16_t precision)
Definition: stringlib.cpp:285
vector< string > string_split(string in, string delimeters)
Parse a string.
Definition: stringlib.cpp:47