Files
s390-tools/include/lib/util_str.h
Wisdom Erhimwionsobo aa29a5f1f9 libutil: Add util_startswith() to util_str
Add util_startswith to util_str to check if a string starts with the
given prefix and returns a pointer to the rest of the string,
or NULL if it does not.

Signed-off-by: Wisdom Erhimwionsobo <werh29@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2026-02-12 13:11:44 +01:00

20 lines
554 B
C

/**
* @defgroup util_str_h util_str: String functions
* @{
* @brief Manipulate and work with strings
*
* Copyright IBM Corp. 2025
*
* s390-tools is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*/
#ifndef LIB_UTIL_STR_H
#define LIB_UTIL_STR_H
void util_str_rm_whitespace(const char *src, char *dest);
const char *util_startswith(const char *s, const char *prefix);
const char *util_startswith_no_case(const char *s, const char *prefix);
#endif /** LIB_UTIL_STR_H @} */