tickit_stringpos_limit_... - set limit fields in string position counters
Contents
Description
The first four of these functions each set one of the counter fields in pos to the given value, and the
other three to -1. This is useful to create a limit counter to stop tickit_utf8_count(3) or
tickit_utf8_countmore(3) at the given position. The final function initialises all four fields to -1.
Each is also available as a macro which can be used to initialise a new TickitStringPos variable.
TickitStringPos limit = INIT_TICKIT_STRINGPOS_LIMIT_BYTES(b);
Name
tickit_stringpos_limit_... - set limit fields in string position counters
Return Value
The functions all return no value. The macros expand to a struct initialiser expression.
See Also
tickit_utf8_count(3), tickit_stringpos_zero(3), tickit(7) TICKIT_STRINGPOS_LIMIT_BYTES(3)
Synopsis
#include<tickit.h>voidtickit_stringpos_limit_bytes(TickitStringPos*pos,size_tbytes);voidtickit_stringpos_limit_codepoints(TickitStringPos*pos,intcodepoints);voidtickit_stringpos_limit_graphemes(TickitStringPos*pos,intgraphemes);voidtickit_stringpos_limit_columns(TickitStringPos*pos,intcolumns);voidtickit_stringpos_limit_none(TickitStringPos*pos);#defineINIT_TICKIT_STRINGPOS_LIMIT_BYTES(bytes)#defineINIT_TICKIT_STRINGPOS_LIMIT_CODEPOINTS(codepoints)#defineINIT_TICKIT_STRINGPOS_LIMIT_GRAPHEMES(grahpemes)#defineINIT_TICKIT_STRINGPOS_LIMIT_COLUMNS(columns)#defineINIT_TICKIT_STRINGPOS_LIMIT_NONE
Link with -ltickit.
