|
|
@ -1583,7 +1583,7 @@ namespace eval punk { |
|
|
|
} |
|
|
|
} |
|
|
|
%# { |
|
|
|
%# { |
|
|
|
set active_key_type "string" |
|
|
|
set active_key_type "string" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!%# not string length is not supported" |
|
|
|
error "!%# not string length is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
#string length - REVIEW - |
|
|
|
#string length - REVIEW - |
|
|
@ -1595,7 +1595,7 @@ namespace eval punk { |
|
|
|
%%# { |
|
|
|
%%# { |
|
|
|
#experimental |
|
|
|
#experimental |
|
|
|
set active_key_type "string" |
|
|
|
set active_key_type "string" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!%%# not string length is not supported" |
|
|
|
error "!%%# not string length is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
#string length - REVIEW - |
|
|
|
#string length - REVIEW - |
|
|
@ -1606,7 +1606,7 @@ namespace eval punk { |
|
|
|
} |
|
|
|
} |
|
|
|
%str { |
|
|
|
%str { |
|
|
|
set active_key_type "string" |
|
|
|
set active_key_type "string" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!%str - not string-get is not supported" |
|
|
|
error "!%str - not string-get is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
lappend INDEX_OPERATIONS string-get |
|
|
|
lappend INDEX_OPERATIONS string-get |
|
|
@ -1617,7 +1617,7 @@ namespace eval punk { |
|
|
|
%sp { |
|
|
|
%sp { |
|
|
|
#experimental |
|
|
|
#experimental |
|
|
|
set active_key_type "string" |
|
|
|
set active_key_type "string" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!%sp - not string-space is not supported" |
|
|
|
error "!%sp - not string-space is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
lappend INDEX_OPERATIONS string-space |
|
|
|
lappend INDEX_OPERATIONS string-space |
|
|
@ -1628,7 +1628,7 @@ namespace eval punk { |
|
|
|
%empty { |
|
|
|
%empty { |
|
|
|
#experimental |
|
|
|
#experimental |
|
|
|
set active_key_type "string" |
|
|
|
set active_key_type "string" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!%empty - not string-empty is not supported" |
|
|
|
error "!%empty - not string-empty is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
lappend INDEX_OPERATIONS string-empty |
|
|
|
lappend INDEX_OPERATIONS string-empty |
|
|
@ -1638,7 +1638,7 @@ namespace eval punk { |
|
|
|
} |
|
|
|
} |
|
|
|
@words { |
|
|
|
@words { |
|
|
|
set active_key_type "string" |
|
|
|
set active_key_type "string" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!%words - not list-words-from-string is not supported" |
|
|
|
error "!%words - not list-words-from-string is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
lappend INDEX_OPERATIONS list-words-from-string |
|
|
|
lappend INDEX_OPERATIONS list-words-from-string |
|
|
@ -1650,7 +1650,7 @@ namespace eval punk { |
|
|
|
#experimental - leading character based on result not input(?) |
|
|
|
#experimental - leading character based on result not input(?) |
|
|
|
#input type is string - but output is list |
|
|
|
#input type is string - but output is list |
|
|
|
set active_key_type "list" |
|
|
|
set active_key_type "list" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!%chars - not list-chars-from-string is not supported" |
|
|
|
error "!%chars - not list-chars-from-string is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
lappend INDEX_OPERATIONS list-from_chars |
|
|
|
lappend INDEX_OPERATIONS list-from_chars |
|
|
@ -1662,7 +1662,7 @@ namespace eval punk { |
|
|
|
#experimental - flatten one level of list |
|
|
|
#experimental - flatten one level of list |
|
|
|
#join without arg - output is list |
|
|
|
#join without arg - output is list |
|
|
|
set active_key_type "string" |
|
|
|
set active_key_type "string" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!@join - not list-join-list is not supported" |
|
|
|
error "!@join - not list-join-list is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
lappend INDEX_OPERATIONS list-join-list |
|
|
|
lappend INDEX_OPERATIONS list-join-list |
|
|
@ -1674,7 +1674,7 @@ namespace eval punk { |
|
|
|
#experimental |
|
|
|
#experimental |
|
|
|
#input type is list - but output is string |
|
|
|
#input type is list - but output is string |
|
|
|
set active_key_type "string" |
|
|
|
set active_key_type "string" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!%join - not string-join-list is not supported" |
|
|
|
error "!%join - not string-join-list is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
lappend INDEX_OPERATIONS string-join-list |
|
|
|
lappend INDEX_OPERATIONS string-join-list |
|
|
@ -1684,7 +1684,7 @@ namespace eval punk { |
|
|
|
} |
|
|
|
} |
|
|
|
%ansiview { |
|
|
|
%ansiview { |
|
|
|
set active_key_type "string" |
|
|
|
set active_key_type "string" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!%# not string-ansiview is not supported" |
|
|
|
error "!%# not string-ansiview is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
lappend INDEX_OPERATIONS string-ansiview |
|
|
|
lappend INDEX_OPERATIONS string-ansiview |
|
|
@ -1694,7 +1694,7 @@ namespace eval punk { |
|
|
|
} |
|
|
|
} |
|
|
|
%ansiviewstyle { |
|
|
|
%ansiviewstyle { |
|
|
|
set active_key_type "string" |
|
|
|
set active_key_type "string" |
|
|
|
if $get_not { |
|
|
|
if {$get_not} { |
|
|
|
error "!%# not string-ansiviewstyle is not supported" |
|
|
|
error "!%# not string-ansiviewstyle is not supported" |
|
|
|
} |
|
|
|
} |
|
|
|
lappend INDEX_OPERATIONS string-ansiviewstyle |
|
|
|
lappend INDEX_OPERATIONS string-ansiviewstyle |
|
|
@ -5368,6 +5368,7 @@ namespace eval punk { |
|
|
|
#for var="val {a b c}" |
|
|
|
#for var="val {a b c}" |
|
|
|
#proc ::punk::val {{v {}}} {tailcall lindex $v} |
|
|
|
#proc ::punk::val {{v {}}} {tailcall lindex $v} |
|
|
|
#proc ::punk::val {{v {}}} {return $v} ;#2023 - approx 2x faster than the tailcall lindex version |
|
|
|
#proc ::punk::val {{v {}}} {return $v} ;#2023 - approx 2x faster than the tailcall lindex version |
|
|
|
|
|
|
|
#tclint-disable-next-line |
|
|
|
proc ::punk::val [list [list v [purelist]]] {return $v} |
|
|
|
proc ::punk::val [list [list v [purelist]]] {return $v} |
|
|
|
#---------------- |
|
|
|
#---------------- |
|
|
|
|
|
|
|
|
|
|
@ -7437,7 +7438,7 @@ namespace eval punk { |
|
|
|
foreach v $known_punk { |
|
|
|
foreach v $known_punk { |
|
|
|
set c1 [overtype::left $col1 $v] |
|
|
|
set c1 [overtype::left $col1 $v] |
|
|
|
if {[info exists ::env($v)]} { |
|
|
|
if {[info exists ::env($v)]} { |
|
|
|
set c2 [overtype::left $col2 [set ::env($v)] |
|
|
|
set c2 [overtype::left $col2 [set ::env($v)]] |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
set c2 [overtype::right $col2 "(NOT SET)"] |
|
|
|
set c2 [overtype::right $col2 "(NOT SET)"] |
|
|
|
} |
|
|
|
} |
|
|
|