How do I sort a TStringList without it changing the case?
· #1I have a TStringList of names and I want them sorted alphabetically, ignoring upper and lower case. Sort puts all the capital letters first. Is there a setting?
I have a TStringList of names and I want them sorted alphabetically, ignoring upper and lower case. Sort puts all the capital letters first. Is there a setting?
i have a similar issue. my printer is out of magenta but it wont print black and white either. is this a stringlist thing
I... don't think that's a similar issue?
its similar because it also doesnt work
Answering the question that was asked:
Names.CaseSensitive := False;
Names.Sort;CaseSensitive controls how the list compares strings, both for Sort and for IndexOf. If you want the list to stay sorted as you add to it, set Names.Sorted := True instead of calling Sort yourself.
For anything fancier, pass your own comparison to CustomSort.
ok but what about the magenta
The printer wants magenta to print black because the printer is a hostage situation with a paper tray. It has nothing to do with TStringList, and I say that as someone who would love to blame TStringList for something.
CaseSensitive := False did it. Thank you, Lena. Sorry about the printer, Yolo.
One topic, one problem. demo_yolo, your printer has been moved to its own topic in Off topic, next to the other printer. They can keep each other company.
Forum rules 1 to 10 apply. Yes, to you.