> home > Custom Layer Boundary API

buffer_seek_character_class

September 8th 2024
Scan a buffer from a point to the first character in a specified set of characters

Signature

C++
String_Match
buffer_seek_character_class(Application_Links* app,
                            Buffer_ID buffer,
                            Character_Predicate* predicate,
                            Scan_Direction direction,
                            i64 start_pos);

Parameters

app

the standard custom layer context pointer

buffer

the id of the buffer who's contents to seek

predicate

specifies the set of bytes that will end the scan

direction

the scan direction of the scan from the start point

start_pos

the start point of the scan

Return

a single string match containing a range of a single character on success, when the buffer exists and a match is found, otherwise a cleared to zero; one can easily determine whether there was a match by the buffer member of the result

Related

Character_Predicate
String_Match