[r65]: / trunk / library / FB_StreamBuffer / Find / svnobj  Maximize  Restore  History

Download this file

37 lines (37 with data), 3.2 kB

Gx_l„!0…jüo	0ôÊùQ"O<
System.StringL{f8a58466-d7f6-439f-bbb8-d4600e41d099}ImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocumentL{f3878285-8e4f-490b-bb1b-9acbb7eb04db}TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}	Id
longTagText
udiLoop := 0;iSearch := 0;BpBuffer := pStrBuf + udiStartPos;>pSearch := ADR( sSearchString);|WHILE(pSearch^ <> 0 ) AND udiLoop + udiStartPos < udiLength DO@    IF pBuffer^ <> pSearch^ THEN>        udiLoop := udiLoop + 1;f        pBuffer := pStrBuf + udiStartPos + udiLoop;N        pSearch := ADR( sSearchString);*        iSearch := 0;    ELSE<        iSearch := iSearch +1;z        pBuffer := pStrBuf + udiStartPos + udiLoop + iSearch;d        pSearch := ADR( sSearchString ) + iSearch;    END_IF;END_WHILE;DFind := udiLoop + 1 + udiStartPos;Interface L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}!(* "~    Find a searchstring in the buffer and returns its position.#€    It's possible to add a preffered startposition within buffer$*)%&METHOD Find : UDINT&VAR_INPUT'6    sSearchString : STRING;(0    udiStartPos : UDINT;)END_VAR*VAR+(    udiLoop : UDINT;,(    iSearch : UDINT;-<    pBuffer : POINTER TO BYTE;.<    pSearch : POINTER TO BYTE;ÐÐÐEÐÐ	
­ÚÐ-
ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­	ÚÐ-ÐÐ	
­
ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­
ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-Ð ÐEÐÐ	
­ÚÐ-!ÐÐ	
­ÚÐ-"ÐÐ	
­ÚÐ-#ÐÐ	
­ÚÐ-$ÐÐ	
­ÚÐ-%ÐÐ	
­ÚÐ-&ÐÐ	
­ÚÐ-'ÐÐ	
­ÚÐ-(ÐÐ	
­ÚÐ-)ÐÐ	
­ÚÐ-*ÐÐ	
­ ÚÐ-+ÐÐ	
­!ÚÐ-,ÐÐ	
­"ÚÐ--ÐÐ	
­#ÚÐ-.ÐÐ	
­ÚÐ-)