labwc/include/common/string-helpers.h
Tomi Ollila 7ad5200f2e includes: identifier consistency in include guards
Made all header files to have LABWC_ prefix in include guard identifers.

Converted from __LABWC_ in 35 include/ files.
Converted from __LAB_ in 5 include/ files.
Added LABWC prefix to 3 include/ files.
Added include guards to 3 include/ files.

The double underscores were removed since according to C standard
those "are always reserved for any use".
2023-05-13 22:29:21 +01:00

19 lines
547 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#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 */