OceanBase Plugin Development Kit
OceanBase Plugin Development Kit
载入中...
搜索中...
未找到
ob_plugin_charset_info.h
浏览该文件的文档.
1/*
2 * Copyright (c) 2023 OceanBase
3 * OceanBase is licensed under Mulan PubL v2.
4 * You can use this software according to the terms and conditions of the Mulan PubL v2.
5 * You may obtain a copy of Mulan PubL v2 at:
6 * http://license.coscl.org.cn/MulanPubL-2.0
7 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10 * See the Mulan PubL v2 for more details.
11 */
12
13#pragma once
14
16
22#ifdef __cplusplus
23extern "C" {
24#endif
25
27{
32 OBP_CHAR_TYPE_PUNCT = 020, /*< Punctuation */
35 OBP_CHAR_TYPE_HEX = 0200 /*< hexadecimal digit */
36};
37
39
45
54OBP_PUBLIC_API int obp_charset_ctype(ObPluginCharsetInfoPtr cs, int *ctype, const unsigned char *str, const unsigned char *end);
55
62OBP_PUBLIC_API size_t obp_charset_numchars(ObPluginCharsetInfoPtr cs, const char *str, const char *end);
63
64#ifdef __cplusplus
65} // extern "C"
66#endif
67
OBP_PUBLIC_API int obp_charset_is_utf8mb4(ObPluginCharsetInfoPtr cs)
Test whether this is utf8 charset
OBP_PUBLIC_API size_t obp_charset_numchars(ObPluginCharsetInfoPtr cs, const char *str, const char *end)
Count the char number in the string
OBP_PUBLIC_API int obp_charset_ctype(ObPluginCharsetInfoPtr cs, int *ctype, const unsigned char *str, const unsigned char *end)
Get the ctype of the char
OBP_PUBLIC_API const char * obp_charset_csname(ObPluginCharsetInfoPtr cs)
ObPluginDatum ObPluginCharsetInfoPtr
enum OBP_PUBLIC_API ObPluginCharType
#define OBP_PUBLIC_API
void * ObPluginDatum
Used for param type