MPD: util/MimeType.hxx File Reference

MPD 0.20.15

Functions
MimeType.hxx File Reference
`#include <string>`
`#include <map>`
Include dependency graph for MimeType.hxx:

Go to the source code of this file.

## Functions
std::string | GetMimeTypeBase (const char *s)
| Extract the part of the MIME type before the parameters, i.e. More...
std::map< std::string, std::string > | ParseMimeTypeParameters (const char *s)
| Parse the parameters from a MIME type string. More...

## Function Documentation

## ◆ GetMimeTypeBase()

std::string GetMimeTypeBase | ( | const char * | s | ) |

Extract the part of the MIME type before the parameters, i.e.

the part before the semicolon. If there is no semicolon, it returns the string as-is.

## ◆ ParseMimeTypeParameters()

std::map<std::string, std::string> ParseMimeTypeParameters | ( | const char * | s | ) |

Parse the parameters from a MIME type string.

Parameters are separated by semicolon. Example:

"foo/bar; param1=value1; param2=value2"