![]() |
F´ Flight Software - C/C++ Documentation
NASA-v2.0.1
A framework for building embedded system applications to NASA flight quality standards.
|
Functions | |
| char * | string_copy (char *destination, const char *source, U32 num) |
| copy string with null-termination guaranteed More... | |
| char * Fw::StringUtils::string_copy | ( | char * | destination, |
| const char * | source, | ||
| U32 | num | ||
| ) |
copy string with null-termination guaranteed
Standard implementations of strncpy fail to guarantee the termination of a string with the null terminator. This implementation guarantees the string is properly null-terminated at the possible expense of the last character of the copied string being lost. The user is responsible for providing a destination large enough for the content and a null-character. Other behavior retains the behavior of strncpy.
| destination | destination buffer to hold copied contents |
| source | source buffer to read content to copy |
| num | length of destination buffer |
Definition at line 4 of file StringUtils.cpp.