chromium/third_party/skia/src/base/SkUTF.cpp

// Copyright 2018 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

#include "src/base/SkUTF.h"

#include "include/private/base/SkTFitsIn.h"

static constexpr inline int32_t left_shift(int32_t value, int32_t shift) {}

template <typename T> static constexpr bool is_align2(T x) {}

template <typename T> static constexpr bool is_align4(T x) {}

static constexpr inline bool utf16_is_high_surrogate(uint16_t c) {}

static constexpr inline bool utf16_is_low_surrogate(uint16_t c) {}

/** @returns   -1  iff invalid UTF8 byte,
                0  iff UTF8 continuation byte,
                1  iff ASCII byte,
                2  iff leading byte of 2-byte sequence,
                3  iff leading byte of 3-byte sequence, and
                4  iff leading byte of 4-byte sequence.
      I.e.: if return value > 0, then gives length of sequence.
*/
static int utf8_byte_type(uint8_t c) {}
static bool utf8_type_is_valid_leading_byte(int type) {}

static bool utf8_byte_is_continuation(uint8_t c) {}

////////////////////////////////////////////////////////////////////////////////

int SkUTF::CountUTF8(const char* utf8, size_t byteLength) {}

int SkUTF::CountUTF16(const uint16_t* utf16, size_t byteLength) {}

int SkUTF::CountUTF32(const int32_t* utf32, size_t byteLength) {}

template <typename T>
static SkUnichar next_fail(const T** ptr, const T* end) {}

SkUnichar SkUTF::NextUTF8(const char** ptr, const char* end) {}

SkUnichar SkUTF::NextUTF8WithReplacement(const char** ptr, const char* end) {}

SkUnichar SkUTF::NextUTF16(const uint16_t** ptr, const uint16_t* end) {}

SkUnichar SkUTF::NextUTF32(const int32_t** ptr, const int32_t* end) {}

size_t SkUTF::ToUTF8(SkUnichar uni, char utf8[SkUTF::kMaxBytesInUTF8Sequence]) {}

size_t SkUTF::ToUTF16(SkUnichar uni, uint16_t utf16[2]) {}

int SkUTF::UTF8ToUTF16(uint16_t dst[], int dstCapacity, const char src[], size_t srcByteLength) {}

int SkUTF::UTF16ToUTF8(char dst[], int dstCapacity, const uint16_t src[], size_t srcLength) {}