summaryrefslogtreecommitdiff
path: root/core/ustring.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-05-15 07:54:02 +0200
committerGitHub <noreply@github.com>2017-05-15 07:54:02 +0200
commit2065d304147e5d919d92c321188862f663917131 (patch)
tree67f972764b9b4935397f4dab2ab79bc6b3927185 /core/ustring.h
parent1b5c57916688b384be8aeacfb3aaedcf6e956d6e (diff)
parentf2564ca97fd6a25bc68f2e7302461970306fc837 (diff)
Merge pull request #8717 from damianday/master
Fix natural sorting order in EditorFileDialog, FileDialog and EditorFileSystemDirectory
Diffstat (limited to 'core/ustring.h')
-rw-r--r--core/ustring.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/ustring.h b/core/ustring.h
index 9ee3c2042c..d00bfa59b5 100644
--- a/core/ustring.h
+++ b/core/ustring.h
@@ -98,6 +98,7 @@ public:
signed char casecmp_to(const String &p_str) const;
signed char nocasecmp_to(const String &p_str) const;
+ signed char naturalnocasecmp_to(const String &p_str) const;
const CharType *c_str() const;
/* standard size stuff */
@@ -256,6 +257,14 @@ struct NoCaseComparator {
}
};
+struct NaturalNoCaseComparator {
+
+ bool operator()(const String &p_a, const String &p_b) const {
+
+ return p_a.naturalnocasecmp_to(p_b) < 0;
+ }
+};
+
/* end of namespace */
//tool translate