This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns a string formatted for natural sorting. This function is very useful when having to sort alpha-numeric strings. | |
* | |
* @author Alexandre Potvin Latreille (plalx) | |
* @param {nvarchar(4000)} string The formatted string. | |
* @param {int} numberLength The length each number should have (including padding). This should be the length of the longest number. Defaults to 10. | |
* @param {char(50)} sameOrderChars A list of characters that should have the same order. Ex: '.-/'. Defaults to empty string. | |
* | |
* @return {nvarchar(4000)} A string for natural sorting. | |
* Example of use: |