use std chr functions
The ones in std have overloads for const char/char. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:

committed by
Max Kellermann

parent
99afe8e6d1
commit
e4dad42ca1
@@ -20,12 +20,12 @@
|
||||
#include "MimeType.hxx"
|
||||
#include "SplitString.hxx"
|
||||
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
|
||||
std::string
|
||||
GetMimeTypeBase(const char *s) noexcept
|
||||
{
|
||||
const char *semicolon = strchr(s, ';');
|
||||
const char *semicolon = std::strchr(s, ';');
|
||||
return semicolon != nullptr
|
||||
? std::string(s, semicolon)
|
||||
: std::string(s);
|
||||
|
Reference in New Issue
Block a user