Finds the end of the last whole line in a buffer.
function LineStart(Buffer: PAnsiChar; BufPos: PAnsiChar): PAnsiChar; overload; function LineStart(Buffer: PWideChar; BufPos: PWideChar): PWideChar; overload; function LineStart(const Buffer: TBytes; BufPos: Integer): Integer; overload;
PAnsiChar LineStart(PAnsiChar Buffer, PAnsiChar BufPos); PWideChar LineStart(PWideChar Buffer, PWideChar BufPos); int LineStart(const TBytes Buffer, int BufPos);
Use LineStart to find the start of the last partial line in the buffer. LineStart starts at BufPos and scans backwards for a line-feed character (\n). It returns a pointer to that character. If no line-feed char is found, it returns the Buffer pointer. Buffer should point to the beginning of a block of memory and BufPos to the end of the block you want to scan.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|