safec  3.0
Safe C Library - ISO TR24731 Bounds Checking Interface
strljustify_s.c File Reference
#include "safe_str_lib.h"
+ Include dependency graph for strljustify_s.c:

Functions

EXPORT errno_t strljustify_s (char *dest, rsize_t dmax)
 Removes beginning whitespace from the string pointed to by dest by shifting the text left over writting the beginning whitespace, left justifying the text. More...
 

Function Documentation

◆ strljustify_s()

EXPORT errno_t strljustify_s ( char *  dest,
rsize_t  dmax 
)

Removes beginning whitespace from the string pointed to by dest by shifting the text left over writting the beginning whitespace, left justifying the text.

The left justified text is null terminated. The text is shifted so the original pointer can continue to be used.

Remarks
EXTENSION TO ISO/IEC JTC1 SC22 WG14 N1172, Programming languages, environments and system software interfaces, Extensions to the C Library, Part I: Bounds-checking interfaces
Parameters
[out]destpointer to string to left justify
[in]dmaxrestricted 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
EOKwhen successful operation
ESNULLPwhen dest is NULL pointer
ESZEROLwhen dmax = 0
ESLEMAXwhen dmax > RSIZE_MAX_STR
ESUNTERMwhen dest was not null terminated
See also
strremovews_s(),