Login   /   Register

Pad Number String with Zeroes

May 3rd, 2008 by Meir Bar-Tal
     1 votes, average: 4 out of 51 votes, average: 4 out of 51 votes, average: 4 out of 51 votes, average: 4 out of 51 votes, average: 4 out of 5
Loading ... Loading ...

Sometimes a numbered list is required, such as a list to populate a ListView, TreeView or one to create sequential files in a folder. One of the main problems is that such lists typically sort the items lexicographically, so that numbered items end-up in the wrong order, such as File_1, File_10, FIle_11, …, File_2, FIle_20, […]