Sort file names func

Ale*_*lev 5 c++

I'm looking for a function to sort file names by name including numbers. It must do a special processing for numbers in names (as standard file managers of Windows/MAC OSes does).

E.g. usual sort function by just name sorts in this order:

name1
name11
name2
Run Code Online (Sandbox Code Playgroud)

I need my function to sort in the following order:

name1
name2
name11
Run Code Online (Sandbox Code Playgroud)

Is there a some standard or well known/working function?

The way I will use it:

std::sort(names.begin(), names.end(), sortfn);
Run Code Online (Sandbox Code Playgroud)

I can write it without very big problems but prefer standard solutions. However, failed to google them.