Skip to content

1.5.0

Compare
Choose a tag to compare
@rouson rouson released this 27 Oct 04:02
· 43 commits to main since this release
ed308b1

This release

  1. A unary operator(.csv.) with a string_t result encapsulating a comma-separated value (CSV) created from
    a. a string_t array or
    b. a character array,
  2. A binary operator(.sv.) with a string_t result encapsulating a CSV created from left- and right-hand operands:
    a. a string_t array and a string_t separator or
    b. a string_t array and a character separator.
    c. a character array and a character separator
    d. a character array and a string_t separator
  3. A unit test that verifies the following identities:
"a,bc,def" == .csv. [string_t("a"), string_t("bc"), string_t("def")]
"abc,def"  == .csv. ["abc", "def"]
    
"do|re|mi" == (string_t(["do", "re", "mi"])         .sv.          "|" )
"dore|mi"  == (([string_t("dore"), string_t("mi")]) .sv. string_t("|"))
"do|re|mi" == (         ["do", "re", "mi"]          .sv.          "|" )
"do|re|mi" == (         ["do", "re", "mi"]          .sv. string_t("|"))
  1. A bracket type-bound procedure and a test verifying the following identities:
scalar%bracket()           == string_t("[do re mi]") &
all(array%bracket()        == [string_t("[do]"), string_t("[re]"), string_t("[mi]")]) &
all(array%bracket('"')     == [string_t('"do"'), string_t('"re"'), string_t('"mi"')]) &
all(array%bracket("{","}") == [string_t('{do}'), string_t('{re}'), string_t('{mi}')]) &
  1. A get_string_t_array specific procedure supporting the generic get_json_value binding and test verifying the following identities:
associate(json_line  => string_t('"lead singer" : ["stevie", "ray", "vaughn"],'))
  all( json_line%get_json_value(key=string_t("lead singer"), mold=[string_t::]) == [string_t("stevie"), string_t("ray"), string_t("vaughn")]))
end associate

What's Changed

  • Features: string bracketing, CSV operators, and JSON array value reader by @rouson in #23

Full Changelog: 1.4.0...1.5.0