MPD  0.20.15
Functions
StringAPI.hxx File Reference
#include "Compiler.h"
#include <string.h>
Include dependency graph for StringAPI.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

gcc_pure static gcc_nonnull_all size_t StringLength (const char *p) noexcept
 
gcc_pure static gcc_nonnull_all const char * StringFind (const char *haystack, const char *needle) noexcept
 
gcc_pure static gcc_nonnull_all char * StringFind (char *haystack, char needle, size_t size) noexcept
 
gcc_pure static gcc_nonnull_all const char * StringFind (const char *haystack, char needle, size_t size) noexcept
 
gcc_pure static gcc_nonnull_all const char * StringFind (const char *haystack, char needle) noexcept
 
gcc_pure static gcc_nonnull_all char * StringFind (char *haystack, char needle) noexcept
 
gcc_pure static gcc_nonnull_all const char * StringFindLast (const char *haystack, char needle) noexcept
 
gcc_pure static gcc_nonnull_all char * StringFindLast (char *haystack, char needle) noexcept
 
static gcc_nonnull_all void UnsafeCopyString (char *dest, const char *src) noexcept
 
static gcc_nonnull_all char * UnsafeCopyStringP (char *dest, const char *src) noexcept
 
gcc_pure static gcc_nonnull_all bool StringIsEqual (const char *a, const char *b) noexcept
 Checks whether #a and #b are equal. More...
 
gcc_pure static gcc_nonnull_all bool StringIsEqual (const char *a, const char *b, size_t length) noexcept
 Checks whether #a and #b are equal. More...
 
gcc_malloc static gcc_nonnull_all char * DuplicateString (const char *p)
 Copy the string to a new allocation. More...
 

Function Documentation

◆ DuplicateString()

gcc_malloc static gcc_nonnull_all char* DuplicateString ( const char *  p)
inlinestatic

Copy the string to a new allocation.

The return value must be freed with free().

Definition at line 143 of file StringAPI.hxx.

◆ StringFind() [1/5]

gcc_pure static gcc_nonnull_all const char* StringFind ( const char *  haystack,
const char *  needle 
)
inlinestaticnoexcept

Definition at line 50 of file StringAPI.hxx.

◆ StringFind() [2/5]

gcc_pure static gcc_nonnull_all char* StringFind ( char *  haystack,
char  needle,
size_t  size 
)
inlinestaticnoexcept

Definition at line 57 of file StringAPI.hxx.

◆ StringFind() [3/5]

gcc_pure static gcc_nonnull_all const char* StringFind ( const char *  haystack,
char  needle,
size_t  size 
)
inlinestaticnoexcept

Definition at line 64 of file StringAPI.hxx.

◆ StringFind() [4/5]

gcc_pure static gcc_nonnull_all const char* StringFind ( const char *  haystack,
char  needle 
)
inlinestaticnoexcept

Definition at line 71 of file StringAPI.hxx.

◆ StringFind() [5/5]

gcc_pure static gcc_nonnull_all char* StringFind ( char *  haystack,
char  needle 
)
inlinestaticnoexcept

Definition at line 78 of file StringAPI.hxx.

◆ StringFindLast() [1/2]

gcc_pure static gcc_nonnull_all const char* StringFindLast ( const char *  haystack,
char  needle 
)
inlinestaticnoexcept

Definition at line 85 of file StringAPI.hxx.

◆ StringFindLast() [2/2]

gcc_pure static gcc_nonnull_all char* StringFindLast ( char *  haystack,
char  needle 
)
inlinestaticnoexcept

Definition at line 92 of file StringAPI.hxx.

◆ StringIsEqual() [1/2]

gcc_pure static gcc_nonnull_all bool StringIsEqual ( const char *  a,
const char *  b 
)
inlinestaticnoexcept

Checks whether #a and #b are equal.

Definition at line 122 of file StringAPI.hxx.

◆ StringIsEqual() [2/2]

gcc_pure static gcc_nonnull_all bool StringIsEqual ( const char *  a,
const char *  b,
size_t  length 
)
inlinestaticnoexcept

Checks whether #a and #b are equal.

Definition at line 132 of file StringAPI.hxx.

◆ StringLength()

gcc_pure static gcc_nonnull_all size_t StringLength ( const char *  p)
inlinestaticnoexcept

Definition at line 43 of file StringAPI.hxx.

◆ UnsafeCopyString()

static gcc_nonnull_all void UnsafeCopyString ( char *  dest,
const char *  src 
)
inlinestaticnoexcept

Definition at line 99 of file StringAPI.hxx.

◆ UnsafeCopyStringP()

static gcc_nonnull_all char* UnsafeCopyStringP ( char *  dest,
const char *  src 
)
inlinestaticnoexcept

Definition at line 106 of file StringAPI.hxx.