We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2b46028 + 8c9afb8 commit 3cf81d9Copy full SHA for 3cf81d9
flow/designs/asap7/mock-array/util.tcl
@@ -1,5 +1,5 @@
1
# Helper function to split a string into a list of strings and numbers
2
-proc split {str} {
+proc split_strings_and_numbers {str} {
3
set result {}
4
foreach {all letters numbers} [regexp -all -inline {(\D*)(\d*)} $str] {
5
if {$letters ne ""} {
@@ -14,8 +14,8 @@ proc split {str} {
14
15
# Custom comparison function
16
proc natural_compare {str1 str2} {
17
- set list1 [split $str1]
18
- set list2 [split $str2]
+ set list1 [split_strings_and_numbers $str1]
+ set list2 [split_strings_and_numbers $str2]
19
set len [expr {min([llength $list1], [llength $list2])}]
20
for {set i 0} {$i < $len} {incr i} {
21
set part1 [lindex $list1 $i]
0 commit comments