Class TBrookString

Unit

Declaration

type TBrookString = class(TBrookHandledPersistent)

Description

String buffer class and its related methods.

Hierarchy

Overview

Methods

Public constructor Create(AHandle: Pointer); virtual;
Public destructor Destroy; override;
Public function WriteBytes(const ASource: TBytes; ALength: NativeUInt): NativeUInt; virtual;
Public procedure Write(const ASource: string; AEncoding: TEncoding); overload; virtual;
Public procedure Write(const ASource: string); overload; virtual;
Public function ToString: string; override;
Public procedure Clear; virtual;

Properties

Public property OwnsHandle: Boolean read FOwnsHandle write FOwnsHandle;
Public property Content: TBytes read GetContent;
Public property Length: NativeUInt read GetLength;
Public property Text: string read GetText write SetText;

Description

Methods

Public constructor Create(AHandle: Pointer); virtual;

Creates an instance of TBrookString.

Parameters
AHandle[in]
String handle.
Public destructor Destroy; override;

Frees an instance of TBrookString.

Public function WriteBytes(const ASource: TBytes; ALength: NativeUInt): NativeUInt; virtual;

Write a string buffer to the string handle. All strings previously written are kept.

Parameters
ASource[in]
String buffer source to be written.
ALength[in]
Length of the string buffer being written.
Returns

Length of the written string buffer.

Public procedure Write(const ASource: string; AEncoding: TEncoding); overload; virtual;

Writes a string to the string handle. All strings previously written are kept.

Parameters
ASource[in]
String to be written.
AEncoding[in]
Determines the encoding of the string being written.
Public procedure Write(const ASource: string); overload; virtual;

Writes a string to the string handle. All strings previously written are kept.

Parameters
ASource[in]
String to be written.
Public function ToString: string; override;

Gets the string from the string handle.

Public procedure Clear; virtual;

Clears all the content present in the string handle.

Properties

Public property OwnsHandle: Boolean read FOwnsHandle write FOwnsHandle;

Determines if the handle is freed on the class destruction.

Public property Content: TBytes read GetContent;

Gets the content buffer from the string handle.

Public property Length: NativeUInt read GetLength;

Gets the content length from the string handle.

Public property Text: string read GetText write SetText;

Gets or sets a string from or to the string handle.


Generated by PasDoc 0.16.0.