lv_xml_utils.h
Functions
-
const char *lv_xml_get_value_of(const char **attrs, const char *name)
-
int32_t lv_xml_atoi(const char *str)
-
int32_t lv_xml_atoi_split(const char **str, char delimiter)
Convert sections of a string to int. The end of the string is indicated by the
delimiter
.- Parameters:
str – pointer to a string, it will point to the character after the delimiter
delimiter – a character to indicate the end of the int
- Returns:
the int before the next delimiter
-
lv_color_t lv_xml_to_color(const char *str)
-
lv_opa_t lv_xml_to_opa(const char *str)
Concert percentage or integer opacity value from string to integer.
- Parameters:
str – e.g. "70%" or 180
- Returns:
0..255
-
bool lv_xml_to_bool(const char *str)
-
int32_t lv_xml_strtol(const char *str, char **endptr, int32_t base)
-
char *lv_xml_split_str(char **src, char delimiter)
Find a delimiter in a string, terminate the string on the delimiter and update the source string to the next part
- Parameters:
src – point to a variable containing the input string
delimiter – a delimiter character, e.g. ':'
- Returns:
the beginning of next section in the string closed at the delimiter