MCPcopy Create free account
hub / github.com/SmingHub/Sming / fromString

Function fromString

Sming/Core/Data/WebConstants.cpp:70–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70MimeType fromString(const char* str)
71{
72 int i = contentTypeStrings.indexOf(str);
73 if(i < 0) {
74 if(strcasecmp(str, _F("application/xml")) == 0) {
75 return MIME_XML;
76 } else {
77 return MIME_UNKNOWN;
78 }
79 }
80 return MimeType(i);
81}
82
83MimeType fromFullFileName(const char* fileName, MimeType unknown)
84{

Callers

nothing calls this directly

Calls 2

MimeTypeEnum · 0.70
indexOfMethod · 0.45

Tested by

no test coverage detected