Delphi Pages Forums

Delphi Pages Forums (
-   General (
-   -   String character change. (no replacestring) (

FreakaZoid2 07-20-2018 05:16 PM

String character change. (no replacestring)
i have a stringlist of lines of text.
i want to change the 43rd character in the string.
i have it working this way BUT wanted to know if there is a better function/option.
astring := _strlist[i];
astring[43] := '3';
_strlist[i] := astring;
i tried to cast but get compile error left side cannot be assigned to
string(_strlist[i])[43] := '3';
just wanting to learn something new if possible...

Marsheng 07-21-2018 09:37 AM


Not tested but should be correct.

All times are GMT. The time now is 10:07 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.