util/StringUtil: add FindStringSuffix()
This commit is contained in:
@@ -90,6 +90,14 @@ gcc_pure
|
||||
bool
|
||||
StringEndsWith(const char *haystack, const char *needle);
|
||||
|
||||
/**
|
||||
* Check if the given string ends with the specified suffix. If yes,
|
||||
* returns the position of the suffix, and nullptr otherwise.
|
||||
*/
|
||||
gcc_pure
|
||||
const char *
|
||||
FindStringSuffix(const char *p, const char *suffix);
|
||||
|
||||
/**
|
||||
* Copy a string. If the buffer is too small, then the string is
|
||||
* truncated. This is a safer version of strncpy().
|
||||
|
Reference in New Issue
Block a user