It seems so trivial, but I cannot find an answer from Google.
I got a great value for the line for the semaphore at the end of the sorted list of lines.
It seems to me that char.highest.ToString () should do this - but it compares to low, low.
Obviously, it is impossible to create the maximum possible string, because it will always be lower than the same, + more data, but the lines that I sort are valid path names, and therefore the characters used are limited.
In response to the comments:
In the days before Unicode in Delphi, I would just use # 255. I just want a line that will compare above any possible path. It must be trivial - why is it not?
Answer # 2:
This is not a sort that requires a sentinel, this is the processing after that. I have several lists that I sort (with simplified merging, it won’t do the job.), And I duplicate the code, or I have dummy values that are always compared to high.
source
share