diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-25 21:47:23 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-25 23:04:28 +0100 |
commit | ba39c29648282159082dfa999ec40c7fc84b0e3c (patch) | |
tree | 6a95e2609d3c5b51e3439e337d9c500ce48c70d4 | |
parent | 6bee4675509e874d2f2ed8ee960f251b5667a451 (diff) |
global-functions: $ParseKeyValueStore: split key and value...
... into separate variables.
-rw-r--r-- | global-functions.rsc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/global-functions.rsc b/global-functions.rsc index e5e5d50..b212d3a 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -925,8 +925,9 @@ :local Result ({}); :foreach KeyValue in=[ :toarray $Source ] do={ :if ([ :find $KeyValue "=" ]) do={ - :set ($Result->[ :pick $KeyValue 0 [ :find $KeyValue "=" ] ]) \ - [ :pick $KeyValue ([ :find $KeyValue "=" ] + 1) [ :len $KeyValue ] ]; + :local Key [ :pick $KeyValue 0 [ :find $KeyValue "=" ] ]; + :local Value [ :pick $KeyValue ([ :find $KeyValue "=" ] + 1) [ :len $KeyValue ] ]; + :set ($Result->$Key) $Value; } else={ :set ($Result->$KeyValue) true; } |