Branch: refs/heads/dev
Home:
https://github.com/mej/nhc
Commit: 2ad24d31a9c31e75a4165cfb554135a2ddb70da1
https://github.com/mej/nhc/commit/2ad24d31a9c31e75a4165cfb554135a2ddb70da1
Author: Michael Jennings <
m...@lanl.gov>
Date: 2023-01-09 (Mon, 09 Jan 2023)
Changed paths:
M scripts/common.nhc
M test/test_common.nhc
Log Message:
-----------
scripts/common.nhc: Improve most array functions
Minor tweaks/optimizations to a few of the array manipulation
functions in `common.nhc`. Examples include replacing loops with
single `eval` statements whenever possible, skipping some temporary
variables, etc. The missing unit tests have also been added.
Also added a new `str_clean()` function that will be used primarily by
the `cray` checks (still pending review). It's a multipurpose
function, capable of removing leading and/or trailing whitespace,
condensing whitespace, stripping out comments, and either displaying
the result to `stdout` or assigning it to a specified "output
variable." It also includes options to allow the changing of what it
considers to be "whitespace" or "comments." Unit tests for this
function will be added later.