help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions] Reference for unit 'strutils' (#rtl)

StuffString

Replace part of a string with another string.

Declaration

Source position: strutils.pp line 55

function StuffString(

  const AText: String;

  AStart: Cardinal;

  ALength: Cardinal;

  const ASubText: String

):String;

Arguments

AText

  

Text on which to operate.

AStart

  

Start of section to be replaced.

ALength

  

Length of section to be replaced.

ASubText

  

Text to insert at the indicated position.

Function result

Resulting string with indicated section replaced.

Description

StuffString returns a copy of AText with the segment starting at AStart with length ALength, replaced with the string ASubText. Basically it deletes the segment of Atext and inserts the new text in it's place.

Errors

No checking on the validity of the AStart and ALength parameters is done. Providing invalid values may result in access violation errors.

See also

FindPart

  

Search for a substring in a string, using wildcards.

DelChars

  

Delete all occurrences of a given character from a string.

DelSpace

  

Delete all occurrences of a space from a string.

ExtractSubStr

  

Extract a word from a string, starting at a given position in the string.

DupeString

  

Creates and concatenates N copies of a string

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505