X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futil%2Fstring_util.hpp;h=f54839305cb1700737caee3adea4c64f003e9ce5;hb=9af7ca781183b7d57410e5cd3b8bc7f8128ed1b0;hp=d5f9ae13cde9ec3a444c4bbe95ee5a471fa14eea;hpb=1446819b1295a5460898978afdff839514f12bce;p=supertux.git diff --git a/src/util/string_util.hpp b/src/util/string_util.hpp index d5f9ae13c..f54839305 100644 --- a/src/util/string_util.hpp +++ b/src/util/string_util.hpp @@ -1,5 +1,5 @@ // SuperTux -// Copyright (C) 2009 Ingo Ruhnke +// Copyright (C) 2009 Ingo Ruhnke // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -23,6 +23,10 @@ class StringUtil { public: static bool has_suffix(const std::string& data, const std::string& suffix); + + /** Compare two strings according to their numeric value, similar to + what 'sort -n' does. */ + static bool numeric_less(const std::string& lhs, const std::string& rhs); }; #endif