代码拉取完成,页面将自动刷新
// This file is part of UniLib <http://github.com/ufal/unilib/>.
//
// Copyright 2014 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// UniLib version: 3.1.2-devel
// Unicode version: 8.0.0
#pragma once
#include <cstdint>
#include <string>
namespace ufal {
namespace unilib {
class uninorms {
public:
static void nfc(std::u32string& str);
static void nfd(std::u32string& str);
static void nfkc(std::u32string& str);
static void nfkd(std::u32string& str);
private:
static void compose(std::u32string& str);
static void decompose(std::u32string& str, bool kanonical);
static const char32_t CHARS = 0x110000;
struct Hangul {
// Hangul decomposition and composition
static const char32_t SBase = 0xAC00, LBase = 0x1100, VBase = 0x1161,
TBase = 0x11A7;
static const char32_t LCount = 19, VCount = 21, TCount = 28,
NCount = VCount * TCount,
SCount = LCount * NCount;
};
static const uint8_t ccc_index[CHARS >> 8];
static const uint8_t ccc_block[][256];
static const uint8_t composition_index[CHARS >> 8];
static const uint16_t composition_block[][257];
static const char32_t composition_data[];
static const uint8_t decomposition_index[CHARS >> 8];
static const uint16_t decomposition_block[][257];
static const char32_t decomposition_data[];
};
} // namespace unilib
} // namespace ufal
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。