From 01216d806c8c667f83bd1235930bb3abf40289b4 Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Thu, 12 Mar 2020 23:52:49 +0000 Subject: [PATCH] Add a helper function to combine the two steps of filenames sorting (splitting and comparing) --- src/util.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util.cr b/src/util.cr index 1ea3445..2370c40 100644 --- a/src/util.cr +++ b/src/util.cr @@ -65,3 +65,7 @@ def compare_alphanumerically(c, d) end is_c_bigger end + +def compare_alphanumerically(a : String, b : String) + compare_alphanumerically split_by_alphanumeric(a), split_by_alphanumeric(b) +end