F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
StringUtils.hpp
Go to the documentation of this file.
1 #ifndef FW_STRINGUTILS_HPP
2 #define FW_STRINGUTILS_HPP
3 #include <FpConfig.hpp>
4 
5 namespace Fw {
6 namespace StringUtils {
7 
23 char* string_copy(char* destination, const char* source, U32 num);
24 
33 U32 string_length(const CHAR* source, U32 max_len);
34 
44 FwSignedSizeType substring_find(const CHAR* source_string, FwSizeType source_size, const CHAR* sub_string, FwSizeType sub_size);
45 
46 
47 } // namespace StringUtils
48 } // namespace Fw
49 #endif // FW_STRINGUTILS_HPP
char CHAR
Definition: BasicTypes.h:28
PlatformSignedSizeType FwSignedSizeType
Definition: FpConfig.h:25
PlatformSizeType FwSizeType
Definition: FpConfig.h:30
C++-compatible configuration header for fprime configuration.
char * string_copy(char *destination, const char *source, U32 num)
copy string with null-termination guaranteed
Definition: StringUtils.cpp:6
FwSignedSizeType substring_find(const CHAR *source_string, FwSizeType source_size, const CHAR *sub_string, FwSizeType sub_size)
find the first occurrence of a substring
Definition: StringUtils.cpp:34
U32 string_length(const CHAR *source, U32 max_len)
get the length of the source string or max_len if the string is longer than max_len.
Definition: StringUtils.cpp:23