mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
rc.xml: split out rstrip() to string-helpers.c
This commit is contained in:
parent
bc04f50d14
commit
a97428020e
3 changed files with 21 additions and 13 deletions
|
|
@ -25,3 +25,13 @@ string_strip(char *s)
|
|||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
void
|
||||
string_truncate_at_pattern(char *buf, const char *pattern)
|
||||
{
|
||||
char *p = strstr(buf, pattern);
|
||||
if (!p) {
|
||||
return;
|
||||
}
|
||||
*p = '\0';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue