MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

Functions
StringCompare.hxx File Reference
`#include "StringView.hxx"`
`#include "Compiler.h"`
Include dependency graph for StringCompare.hxx:

Go to the source code of this file.

## Functions
static bool | StringIsEmpty (const char *string)
gcc_pure static gcc_nonnull_all bool | StringStartsWith (const char *haystack, StringView needle)
gcc_pure bool | StringEndsWith (const char *haystack, const char *needle)
gcc_pure static gcc_nonnull_all const char * | StringAfterPrefix (const char *haystack, StringView needle)
| Returns the portion of the string after a prefix. More...
gcc_pure const char * | FindStringSuffix (const char *p, const char *suffix)
| Check if the given string ends with the specified suffix. More...

## Function Documentation

gcc_pure const char* FindStringSuffix | ( | const char * | p,
|  | const char * | suffix
| ) |  |

Check if the given string ends with the specified suffix.

If yes, returns the position of the suffix, and nullptr otherwise.

gcc_pure static gcc_nonnull_all const char* StringAfterPrefix | ( | const char * | haystack,
|  | StringView | needle
| ) |  |
| inline static

Returns the portion of the string after a prefix.

If the string does not begin with the specified prefix, this function returns nullptr.

Definition at line 64 of file StringCompare.hxx.

gcc_pure bool StringEndsWith | ( | const char * | haystack,
|  | const char * | needle
| ) |  |

static bool StringIsEmpty | ( | const char * | string | ) |
| inline static

Definition at line 41 of file StringCompare.hxx.

gcc_pure static gcc_nonnull_all bool StringStartsWith | ( | const char * | haystack,
|  | StringView | needle
| ) |  |
| inline static

Definition at line 48 of file StringCompare.hxx.