all repos — mgba @ 22245617f434049f4646916d1b2930d376503b0d

mGBA Game Boy Advance Emulator

src/util/string.h (view raw)

 1/* Copyright (c) 2013-2014 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef UTIL_STRING_H
 7#define UTIL_STRING_H
 8
 9#include "util/common.h"
10
11#ifndef strndup
12// This is sometimes a macro
13char* strndup(const char* start, size_t len);
14#endif
15
16char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len);
17
18int utfcmp(const uint16_t* utf16, const char* utf8, size_t utf16Length, size_t utf8Length);
19char* utf16to8(const uint16_t* utf16, size_t length);
20
21#endif