RawByteStrToBytes

<< Click to Display Table of Contents >>

Navigation:  Functions >

RawByteStrToBytes

SIGNATURE=IW.Common.Strings.RawByteStrToBytes@string@PByte

 

ETYPE=Function

 

Declaration:

Delphi:

procedure RawByteStrToBytes(const S: string; Bytes: PByte);

C++:

void RawByteStrToBytes(const String S, PByte Bytes);

 

Unit: IW.Common.Strings.pas

 

Description: The name RawByteStr here is not accurate, but in the lack of a better name... This function copies HTTP header strings that contain only ASCII chars into a byte array. (HTTP standards limit what can be in an HTTP header) It's much faster than the usual TEncoding way. However ** IT WON'T WORK ** as expected in general code where the source string S contains Unicode chars. You've been warned!

 

Parameters:

 

•S: string

 

•Bytes: PByte