![]() |
![]()
| ![]() |
![]()
NAMExt_strsqueeze() - Squeeze a string by replacing middle with ... LIBRARY#include <xtend/string.h> -lxtend SYNOPSISsize_t xt_strsqueeze(char *dest, const char *src, size_t dstsize) ARGUMENTSdest: Pointer to a character array of at least len dstsize, where the possibly modified string is stored. src: Point to a character array containing the string to compact dstsize: Length of the dest array DESCRIPTIONCopy string src to dest, reducing to a maximum length of dstsize if necessary by replacing the center portion of the string with "...". RETURN VALUESThe length of the original string (like strlcpy(3)) EXAMPLES#define MAXLEN 127 char limited_str[MAXLEN + 1], SEE ALSOstrlcpy(3), strlcat(3)
|