New upstream version 19.0.3+dfsg1
This commit is contained in:
parent
3708b8e092
commit
1f1bbb3518
534 changed files with 13862 additions and 2459 deletions
|
|
@ -197,6 +197,11 @@ wchar_t *wstrstri(const wchar_t *str, const wchar_t *find)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline bool is_padding(char ch)
|
||||
{
|
||||
return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r';
|
||||
}
|
||||
|
||||
char *strdepad(char *str)
|
||||
{
|
||||
char *temp;
|
||||
|
|
@ -210,7 +215,7 @@ char *strdepad(char *str)
|
|||
temp = str;
|
||||
|
||||
/* remove preceding spaces/tabs */
|
||||
while (*temp == ' ' || *temp == '\t')
|
||||
while (is_padding(*temp))
|
||||
++temp;
|
||||
|
||||
len = strlen(str);
|
||||
|
|
@ -219,7 +224,7 @@ char *strdepad(char *str)
|
|||
|
||||
if (len) {
|
||||
temp = str + (len-1);
|
||||
while (*temp == ' ' || *temp == '\t')
|
||||
while (is_padding(*temp))
|
||||
*(temp--) = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue