47bool GetMimeType(
char* dest,
const char* filename, uint32 maxsize);
55bool GetMimeType(
char* dest,
const char* filename, uint32 maxsize,
bool &isBinary);
Cross-platform utility toolbox for CMSDK: threading, synchronization, shared memory,...
bool HTML_UnitTest()
Self-contained unit test of the HTML/URL helpers.
std::string GetURIFromURL(std::string url)
Extract the URI (path plus query) from a URL.
std::string GetProtocolFromURL(std::string url)
Extract the protocol/scheme from a URL.
bool GetMimeType(char *dest, const char *filename, uint32 maxsize)
Look up the MIME type for a filename based on its extension.
bool IsMimeBinary(const char *type)
Determine whether a MIME type denotes binary content.
std::string GetUsernameFromURL(std::string url)
Extract the username from a URL of the form scheme://user:pass@host/...
unsigned char HTML2Char(const char *str)
Convert a single HTML entity (e.g.
std::string EncodeHTML(std::string str)
Encode a plain string for safe embedding in HTML (e.g.
std::string GetPasswordFromURL(std::string url)
Extract the password from a URL of the form scheme://user:pass@host/...
std::string GetHostFromURL(std::string url)
Extract the host name (or IP literal) from a URL.
uint16 GetPortFromURL(std::string url)
Extract the port number from a URL.
std::string DecodeHTML(std::string str)
Decode HTML entities in a string (e.g.
std::string GetAuthenticationFromURL(std::string url)
Extract the full "user:pass" authentication section from a URL.