Skip to content

Commit

Permalink
cookbooks/devel/transformations: docs update for {s.select}
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Jun 25, 2024
1 parent 759b6b1 commit 029001b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/cookbooks/devel/transformations.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,24 @@ Example:
### {s.select,index,separator}

Return a field from PV value. The field is selected based on separator
and index. The separator must be a character used to identify the
fields. Index must be an integer value or a PV. If index is negative, the
and index.

Index must be an integer value or a PV. If index is negative, the
count of fields starts from end of PV value, -1 being last field. If
index is positive, 0 is the first field.

The separator must be a character used to identify the fields. It can also be
an escaped character: `\\`, `\t`, `\n`, `\r` or `\s` (all whitespaces).

Example:

```

Check failure on line 116 in docs/cookbooks/devel/transformations.md

View workflow job for this annotation

GitHub Actions / check-format

Fenced code blocks should have a language specified

docs/cookbooks/devel/transformations.md:116 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md040.md
$var(x) = "12,34,56";
$(var(x){s.select,1,,}) => "34" ;
$var(x) = "12,34,56";
$(var(x){s.select,-2,,}) => "34"
```

### {s.encode.7bit}

Expand Down

0 comments on commit 029001b

Please sign in to comment.