UReplaceableCallbacks
转写器用于操作 UReplaceable 的一组函数指针。
摘要
调用方应提供所需的函数来适当地操作其文本。与 C++ 类 Replaceable 相关。
公共属性 |
|
---|---|
char32At)(const UReplaceable *rep, int32_t offset)
|
UChar32(*
函数指针,返回此文本中给定偏移量处的 UChar32 代码点。
|
charAt)(const UReplaceable *rep, int32_t offset)
|
UChar(*
函数指针,返回此文本中给定偏移量处的 UChar 代码单元;0 <= offset < n,其中 n 是 (*length)(rep) 返回的值。
|
copy)(UReplaceable *rep, int32_t start, int32_t limit, int32_t dest)
|
void(*
函数指针,将此文本中 start 和 limit 之间的文本复制到文本中的另一个索引处。
|
extract)(UReplaceable *rep, int32_t start, int32_t limit, UChar *dst)
|
void(*
函数指针,将范围 [
start , limit ) 中的字符复制到数组 dst 中。 |
length)(const UReplaceable *rep)
|
int32_t(*
函数指针,返回此文本中的 UChar 代码单元数。
|
replace)(UReplaceable *rep, int32_t start, int32_t limit, const UChar *text, int32_t textLength)
|
void(*
函数指针,用给定文本替换此文本中 start 和 limit 之间的文本。
|
公共属性
char32At
在unicode/urep.h
中声明
UChar32(* UReplaceableCallbacks::char32At)(const UReplaceable *rep, int32_t offset)
函数指针,返回此文本中给定偏移量处的 UChar32 代码点。
请参阅 unistr.h,了解 charAt() 和 char32At() 的说明。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回 |
偏移量处的 UChar32(代码点),如果偏移量超出范围,则为 U+FFFF。
|
charAt
在unicode/urep.h
中声明
UChar(* UReplaceableCallbacks::charAt)(const UReplaceable *rep, int32_t offset)
函数指针,返回此文本中给定偏移量处的 UChar 代码单元;0 <= offset < n,其中 n 是 (*length)(rep) 返回的值。
请参阅 unistr.h,了解 charAt() 和 char32At() 的说明。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回 |
偏移量处的 UChar(代码单元),如果偏移量超出范围,则为 U+FFFF。
|
copy
在unicode/urep.h
中声明
void(* UReplaceableCallbacks::copy)(UReplaceable *rep, int32_t start, int32_t limit, int32_t dest)
函数指针,将此文本中 start 和 limit 之间的文本复制到文本中的另一个索引处。
应保留属性(带外信息)。此调用后,在 start..limit-1 处原始字符的副本将至少有两个。
详细信息 | |||||||||
---|---|---|---|---|---|---|---|---|---|
参数 |
|
extract
在unicode/urep.h
中声明
void(* UReplaceableCallbacks::extract)(UReplaceable *rep, int32_t start, int32_t limit, UChar *dst)
函数指针,将范围 [start
, limit
) 中的字符复制到数组 dst
中。
详细信息 | |||||||||
---|---|---|---|---|---|---|---|---|---|
参数 |
|
length
在unicode/urep.h
中声明
int32_t(* UReplaceableCallbacks::length)(const UReplaceable *rep)
函数指针,返回此文本中的 UChar 代码单元数。
详细信息 | |||
---|---|---|---|
参数 |
|
||
返回 |
文本的长度。
|
replace
在unicode/urep.h
中声明
void(* UReplaceableCallbacks::replace)(UReplaceable *rep, int32_t start, int32_t limit, const UChar *text, int32_t textLength)
函数指针,用给定文本替换此文本中 start 和 limit 之间的文本。
应保留属性(带外信息)。
详细信息 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
参数 |
|