Delphi 2006 system.delete for extension?

is there a copy of the removal procedure that can be used for broad references? Or should I just use copy and concatenate the resulting WideStrings?

+2


source to share


2 answers


Delete is "compiler magic". The compiler uses its knowledge of the underlying data type to properly control the operation. For most arrays, it can simply translate the information you write in the code into the actual offset and number of bytes to be removed, and instead passes that to the assembly routine _Delete

. For WideStrings, as Alexander noted, he has a special procedure _WStrDelete.



Bottom line: If you can pass an array or string to Delete and compile it, it should work fine.

+5


source


Internal RTL functions like Delete, Insert, Length, etc. work for both Ansi and Wide string.



For example, a call to Delete on WideString translates to a call to WStrDelete (see System.pas).

+5


source







All Articles