1 #ifndef FW_STRINGUTILS_HPP
2 #define FW_STRINGUTILS_HPP
6 namespace StringUtils {
int8_t I8
8-bit signed integer
float F32
32-bit floating point
uint8_t U8
8-bit unsigned integer
PlatformSignedSizeType FwSignedSizeType
PlatformSizeType FwSizeType
C++-compatible configuration header for fprime configuration.
FwSizeType string_length(const CHAR *source, FwSizeType buffer_size)
get the length of the source string
@ INVALID_BASE
Base was not supplied as 0, or 2-36.
@ SUCCESSFUL_CONVERSION
Output should be valid.
@ NULL_INPUT
A null string was supplied.
@ INVALID_NUMBER
String did not contain a valid number matching supplied base.
@ INVALID_STRING
No \0 detected within the supplied length.
StringToNumberStatus string_to_number(const CHAR *input, FwSizeType buffer_size, U8 &output, char **next, U8 base=0)
converts a string to a U8
char * string_copy(char *destination, const char *source, FwSizeType num)
copy string with null-termination guaranteed
FwSignedSizeType substring_find(const CHAR *source_string, FwSizeType source_size, const CHAR *sub_string, FwSizeType sub_size)
find the first occurrence of a substring