mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
18 lines
509 B
C
18 lines
509 B
C
#ifndef __LABWC_STRING_HELPERS_H
|
|
#define __LABWC_STRING_HELPERS_H
|
|
|
|
/**
|
|
* string_strip - strip white space left and right
|
|
* Note: this function does a left skip, so the returning pointer cannot be
|
|
* used to free any allocated memory
|
|
*/
|
|
char *string_strip(char *s);
|
|
|
|
/**
|
|
* string_truncate_at_pattern - remove pattern and everything after it
|
|
* @buf: pointer to buffer
|
|
* @pattern: string to remove
|
|
*/
|
|
void string_truncate_at_pattern(char *buf, const char *pattern);
|
|
|
|
#endif /* __LABWC_STRING_HELPERS_H */
|