Simplify and improve TStringHelper.Split.

split.patch

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
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information