MPD: DivideString Class Reference

MPD 0.20.18

Public Member Functions
DivideString Class Reference

Split a given constant string at a separator character. More...

`#include <DivideString.hxx>`

## Public Member Functions
| DivideString (const char *s, char separator, bool strip=false)
| ~DivideString ()
bool | IsDefined () const
| Was the separator found? More...
bool | IsEmpty () const
| Is the first part empty? More...
const char * | GetFirst () const
const char * | GetSecond () const

## Detailed Description

Split a given constant string at a separator character.

Duplicates the first part to be able to null-terminate it.

Definition at line 31 of file DivideString.hxx.

## Constructor & Destructor Documentation

## ◆ DivideString()

DivideString::DivideString | ( | const char * | s,
|  | char | separator,
|  | bool | strip = `false`
| ) |  |

Parameters

  strip | strip the first part and left-strip the second part?

## ◆ ~DivideString()

DivideString::~DivideString | ( |  | ) |
| inline

Definition at line 42 of file DivideString.hxx.

## Member Function Documentation

## ◆ GetFirst()

const char* DivideString::GetFirst | ( |  | ) | const
| inline

Definition at line 62 of file DivideString.hxx.

## ◆ GetSecond()

const char* DivideString::GetSecond | ( |  | ) | const
| inline

Definition at line 68 of file DivideString.hxx.

## ◆ IsDefined()

bool DivideString::IsDefined | ( |  | ) | const
| inline

Was the separator found?

Definition at line 49 of file DivideString.hxx.

## ◆ IsEmpty()

bool DivideString::IsEmpty | ( |  | ) | const
| inline

Is the first part empty?

Definition at line 56 of file DivideString.hxx.

The documentation for this class was generated from the following file:

- util/DivideString.hxx