CRE Programmer's Guide
String and Memory Block Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
8-36
Memory_Findchar
Memory_Findchar
The Memory_Findchar functions search for a character in a block of memory. These 
functions are not available in the native CRE library. 
buf
is a pointer to the block of memory to search.
char
specifies the search character. Only bits <8:15> of char are used for the search 
character.
num_bytes
specifies the number of bytes to search.
Return Value
The Memory_Findchar functions return a pointer to the location in buf where char 
was found. If 
char is not found, zero is returned.
Example
STRING .buf[0:9] := [0,1,0,2,0,3,0,4,0,5];
INT i;
i := RTL_Memory_Findchar_(buf, 2, 10); ! i gets @buf[3]
i := RTL_Memory_Findchar_(buf, 6, 10); ! i gets 0
INT PROC RTL_Memory_Findchar_( buf, char, num_bytes );
 STRING .buf; ! in
 INT char; ! in
 INT num_bytes; ! in TNS 
only
INT(32) PROC RTL_Memory_FindcharX_( buf, char, num_bytes );
 STRING .EXT buf; ! in
 INT char; ! in
 INT(32) num_bytes; ! in TNS 
only










