mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-06-20 17:15:48 +02:00
mod/inspectvar: print the length for strings
This commit is contained in:
parent
3521995dbc
commit
187735f35f
1 changed files with 5 additions and 0 deletions
|
@ -39,6 +39,7 @@
|
|||
}
|
||||
|
||||
:local TypeOf [ :typeof $Input ];
|
||||
:local Len [ :len $Input ];
|
||||
:local Return [ $IndentReturn "type" $TypeOf $Level ];
|
||||
|
||||
:if ($TypeOf = "array") do={
|
||||
|
@ -48,6 +49,10 @@
|
|||
[ $InspectVarReturn $Value ($Level + 2) ]);
|
||||
}
|
||||
} else={
|
||||
:if ($TypeOf = "str") do={
|
||||
:set $Return ($Return . "\n" . \
|
||||
[ $IndentReturn "len" $Len $Level ]);
|
||||
}
|
||||
:if ($TypeOf != "nothing") do={
|
||||
:set $Return ($Return . "\n" . \
|
||||
[ $IndentReturn "value" [ $IfThenElse ([ :len $Input ] > 80) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue