From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function StuffString(const AText: AnsiString; AStart, ALength: Cardinal; const ASubText: AnsiString): AnsiString;


extern DELPHI_PACKAGE System::AnsiString __fastcall StuffString(const System::AnsiString AText, unsigned AStart, unsigned ALength, const System::AnsiString ASubText)/* overload */;


Type Visibility Source Unit Parent
function public
System.AnsiStrings System.AnsiStrings


Replace segment of AnsiString with another one.

StuffString replaces a segment of an AnsiString with a substring, ASubText, returning a copy. The replacement starts at byte index AStart and replaces ALength bytes of the original string. If AStart is greater than the byte length of the original string AText, the substring ASubText is added to the end of Atext. The entire substring ASubText is copied to the new string, even if it results in a longer string than the original.

See Also