Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

TAnsiStringBuilder

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Ansi-string version of string builder.

Declaration

Source position: syssbh.inc line 4

type TAnsiStringBuilder = class

public

  constructor Create();

  

Create a new TAnsiStringBuilder instance.

  function Append();

  

Append data in string form to the buffer.

  function AppendFormat();

  

Append the result of a Format.

  function AppendLine();

  

Append a string followed by a newline.

  procedure Clear;

  

Clear the string being built.

  procedure CopyTo();

  

Copy string bytes to an array.

  function EnsureCapacity();

  

Set the capacity if needed.

  function Equals();

  

Check if 2 stringbuilders have the same content string.

  function Insert();

  

Insert data in string form into the buffer at a given position.

  function Remove();

  

Remove data from the string.

  function Replace();

  

Replace a range of characters.

  function ToString();

  

Return the string buffer as an AnsiString.

  property Chars []: AnsiChar; default; [rw]

  

Indexed access to the characters in the string.

  property Length: Integer; [rw]

  

Currentl length of the string buffer.

  property Capacity: Integer; [rw]

  

Current capacity of the string buffer.

  property MaxCapacity: Integer; [r]

  

Maximum capacity of the string buffer.

end;

Inheritance

TAnsiStringBuilder

  

Ansi-string version of string builder.

|

TObject

  

Base class of all classes.

Description

TAnsiStringBuilder is a class to construct an ansistring out of other strings or characters. It's methods can be used instead of constructing the string manually using the normal + or concat operators. If used properly (e.g. by setting a sufficiently large Capacity), will result in faster operation. It offers various methods to append to the string.

To create a unicode string, use the TUnicodeStringBuilder class instead.

See also

TUnicodeStringBuilder

  

Ansi-string version of string builder.


Documentation generated on: Jul 24 2023