add function char_converter_set_pair
parent
abc9882418
commit
8cb8c29c45
|
|
@ -60,6 +60,12 @@ int std_space_char_converter_init(FastCharConverter *pCharConverter,
|
||||||
return char_converter_init(pCharConverter, pairs, SPACE_CHAR_PAIR_COUNT);
|
return char_converter_init(pCharConverter, pairs, SPACE_CHAR_PAIR_COUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void char_converter_set_pair(FastCharConverter *pCharConverter,
|
||||||
|
const unsigned char src, const unsigned char dest)
|
||||||
|
{
|
||||||
|
pCharConverter->char_table[src] = dest;
|
||||||
|
}
|
||||||
|
|
||||||
int fast_char_convert(FastCharConverter *pCharConverter,
|
int fast_char_convert(FastCharConverter *pCharConverter,
|
||||||
char *text, const int text_len)
|
char *text, const int text_len)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,17 @@ int char_converter_init(FastCharConverter *pCharConverter,
|
||||||
int std_space_char_converter_init(FastCharConverter *pCharConverter,
|
int std_space_char_converter_init(FastCharConverter *pCharConverter,
|
||||||
const unsigned char dest_base);
|
const unsigned char dest_base);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* standard space chars to convert
|
||||||
|
* parameters:
|
||||||
|
* pCharConverter: the char converter
|
||||||
|
* src: the src char
|
||||||
|
* dest: the dest char
|
||||||
|
* return: none
|
||||||
|
*/
|
||||||
|
void char_converter_set_pair(FastCharConverter *pCharConverter,
|
||||||
|
const unsigned char src, const unsigned char dest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* char convert function
|
* char convert function
|
||||||
* parameters:
|
* parameters:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue