Lines Matching +defs:suffix +defs:string
19 char *string, *suffix, *fn;
30 string = list->word->word;
31 suffix = (char *)NULL;
35 suffix = list->word->word;
44 slen = strlen (string);
47 while (slen > 0 && string[slen - 1] == '/')
50 /* (2) If string consists entirely of slash characters, string shall be
59 /* (3) If there are any trailing slash characters in string, they
61 string[slen] = '\0';
63 /* (4) If there are any slash characters remaining in string, the prefix
64 of string up to an including the last slash character in string
67 if (string[slen] == '/')
70 fn = string + slen + 1;
72 /* (5) If the suffix operand is present, is not identical to the
73 characters remaining in string, and is identical to a suffix
74 of the characters remaining in string, the suffix suffix
75 shall be removed from string. Otherwise, string shall not be
77 if (suffix)
79 sufflen = strlen (suffix);
84 if (strcmp (fn + off, suffix) == 0)
94 "pathname component in STRING. If the suffix string SUFFIX is",
106 "basename string [suffix]", /* usage synopsis */