MPD: util/WStringCompare.hxx File Reference

MPD 0.20.18

Functions
WStringCompare.hxx File Reference
`#include "Compiler.h"`
`#include <wchar.h>`
Include dependency graph for WStringCompare.hxx:

Go to the source code of this file.

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

## Function Documentation

## ◆ FindStringSuffix()

gcc_pure const wchar_t* FindStringSuffix | ( | const wchar_t * | p,
|  | const wchar_t * | suffix
| ) |  |
| noexcept

Check if the given string ends with the specified suffix.

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

## ◆ StringAfterPrefix()

gcc_pure gcc_nonnull_all const wchar_t* StringAfterPrefix | ( | const wchar_t * | string,
|  | const wchar_t * | prefix
| ) |  |
| noexcept

Returns the portion of the string after a prefix.

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

## ◆ StringEndsWith()

gcc_pure bool StringEndsWith | ( | const wchar_t * | haystack,
|  | const wchar_t * | needle
| ) |  |
| noexcept

## ◆ StringIsEmpty()

static bool StringIsEmpty | ( | const wchar_t * | string | ) |
| inlinestatic

Definition at line 38 of file WStringCompare.hxx.

## ◆ StringStartsWith()

gcc_pure bool StringStartsWith | ( | const wchar_t * | haystack,
|  | const wchar_t * | needle
| ) |  |
| noexcept