From 187735f35f7b361b1cc6d45f703d5c121681254c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 8 May 2025 11:12:02 +0200 Subject: [PATCH] mod/inspectvar: print the length for strings --- mod/inspectvar.rsc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mod/inspectvar.rsc b/mod/inspectvar.rsc index b864d9a..84c40d8 100644 --- a/mod/inspectvar.rsc +++ b/mod/inspectvar.rsc @@ -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) \