Simplify and improve TStringHelper.Split.
First, this avoids code duplication entirely by a very clever trick of assuming virtual separator at the end of the string.
Second, this uses logarithmic growth, removing quadratic factor from DupeString('piece,', 10 * 1000 * 1000).Split([','])
.
Version with LOCAL PROCEDURES kept: split_lp.patch.
Edited by Rika