GetByteLength Method

Overloads

GetByteLength(string)

Retrieves the byte length of a unicode string.

GetByteLength(WideString)

Retrieves the byte length of a WideString.

GetByteLength(RawByteString)

Retrieves the byte length of a RawByteString (AnsiString or UTF8String).

GetByteLength(string)

Retrieves the byte length of a unicode string.

Delphi
function GetByteLength(const s: string): Integer

Parameters

s
string

Returns

Integer

Remarks

Although there is already a routine SysUtils.ByteLength(string) function, it only supports unicode strings and doesn't provide overloads for WideStrings and AnsiStrings.

GetByteLength(WideString)

Retrieves the byte length of a WideString.

Delphi
function GetByteLength(const s: WideString): Integer

Parameters

s
WideString

Returns

Integer

GetByteLength(RawByteString)

Retrieves the byte length of a RawByteString (AnsiString or UTF8String).

Delphi
function GetByteLength(const s: RawByteString): Integer

Parameters

s
RawByteString

Returns

Integer