Skip to content

Commit

Permalink
str.h: Fix doc line wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Mar 28, 2018
1 parent 8c47042 commit aaf884b
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions str.h
Expand Up @@ -32,16 +32,20 @@
/*!
* \page DataTypeText Common data type for text variables.
*
* This data type encapsulate a standard C char array. Its recommended to use
* this type if you need variables holding text. Its caches the length of the
* C string to avoid repetive calls to strlen, thus improving performance.
* Its also safer to explicitly give the length to string operations of the core
* or C libraries to prevent problems because of buffer overflows and missing
* This data type encapsulates a standard C char array. It's recommended to
* use this type if you need variables holding text. It caches the length of
* the C string to avoid repetive calls to strlen, thus improving performance.
*
* It's also safer to explicitly give the length to string operations of the
* core or C libraries to prevent problems because of buffer overflows and
* missing null-termination.
*
* Important: The char array inside this type is not null-terminated. So if
* you need to work with external functions that rely on this termination you
* must add a zero at the end by yourself. Keep in mind that the length of the
* char array is normally not large enough to store this additional
* null-termination.
* Important: The char array inside this type is not null-terminated. So if you
* need to work with external functions that rely on this termination you must
* add a zero at the end by yourself. Keep in mind that the length of the char
* array is normally not large enough to store this additional null-termination.
*
* So you must copy the char array to a new buffer that is (len + 1) big,
* otherwise memory corruption and undefined behavour will occur.
* Most libraries often provide functions that can work with an explicit given
Expand Down

0 comments on commit aaf884b

Please sign in to comment.