Skip to content

Conversation

@sje397
Copy link

@sje397 sje397 commented Apr 16, 2024

Adds alphanumeric sort (command line option -Y).

So for example instead of sorting files like

file1
file12
file2
file20

...it would sort instead like

file1
file2
file12
file20

isdigit(char c)
{
return '0' <= c && c <= '9';
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's probably a better function to use. I was trying to avoid adding any headers.

Comment on lines +3300 to +3302
char str1[2] = {*s1, '\0'};
char str2[2] = {*s2, '\0'};
return cmp (str1, str2);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably isn't quite right either (for unicode).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants