Removes beginning and trailing whitespace from the string pointed to by dest by shifting the text left over writting the beginning whitespace (space or tab).
The shifted-trimmed text is null terminated. The text is shifted so the original pointer can continue to be used. This is useful when the memory was malloc'ed and will need to be freed.
- Parameters
-
[out] | dest | pointer to string to left justify |
[in] | dmax | restricted maximum length of string |
- Precondition
- dest shall not be a null pointer.
-
dmax shall not be 0
-
dmax shall not be greater than RSIZE_MAX_STR
-
dest shall be null terminated
- Return values
-
EOK | when successful operation |
ESNULLP | when dest is NULL pointer |
ESZEROL | when dmax = 0 |
ESLEMAX | when dmax > RSIZE_MAX_STR |
ESUNTERM | when dest was not null terminated |
- See also
- strljustify_s(),