ss_string_rcrop_c_string(3) - Linux man page
Name
ss_string_crop family - deletes a substring of a stringSynopsis
Linking with -lsstrings2
int ss_string_crop(ss_string *string, const ss_string *pattern);
int ss_string_crop_c_string(ss_string *string, const char *pattern);
int ss_string_crop_c_string_l(ss_string *string, const char *pattern, size_t patt_len);
int ss_string_rcrop(ss_string *string, const ss_string *pattern);
int ss_string_rcrop_c_string(ss_string *string, const char *pattern);
int ss_string_rcrop_c_string_l(ss_string *string, const char *pattern, size_t patt_len);
Description
ss_string_crop deletes the first occurence of the substring pattern in string. Note that both parameter must be valid ss_string objects (initialized with ss_string_new).ss_string_crop_c_string deletes the first occurence of the substring (a C-string pointed to by pattern) in string. Note that string must be a valid ss_string object.
ss_string_crop_c_string_l works like ss_string_crop_c_string. The third parameter, patt_len, is the right length of pattern. Note that this function does not check whether patt_len is the right length of pattern.
The ss_string_rcrop_* functions work the same way but they delete the last occurence of pattern in string.
Returning values
The functions return 1 on succes, -1 if pattern is not found. They return 0 on error.Error values for ss_errno
SS_NULL if one parameteris NULL
SS_EINVAL if the ss_string objects are invalid
Bugs
Please sendyour bug reports to yanezp@informatik.uni-freiburg.de