Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed Nov 27, 2023
1 parent 4a5d289 commit d45437a
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions Fix-function-and-Cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ put_vars(

##### `add_field`

Creates (or appends to) a field with a defined value.
Creates a field with a defined value.

```perl
add_field("<targetFieldName>", "<fieldValue>")
Expand Down Expand Up @@ -179,7 +179,7 @@ call_macro("<macroName>"[, <dynamicLocalVariables>...])

##### `copy_field`

Copies (or appends to) a field from an existing field.
Copies a field from an existing field.

```perl
copy_field("<sourceField>", "<targetField>")
Expand Down Expand Up @@ -211,7 +211,7 @@ hash("foo")

##### `move_field`

Moves (or appends to) a field from an existing field. Can be used to rename a field.
Moves a field from an existing field. Can be used to rename a field.

```perl
move_field("<sourceField>", "<targetField>")
Expand Down Expand Up @@ -611,8 +611,19 @@ upcase("<sourceField>")

Encodes a field value as URI. Aka percent-encoding.

Options:

- `plus_for_space`: Sets whether "space" (` `) will be substituted by a "plus" (`+`) or be percent escaped (`%20`). (Default: `true`)
- `safe_chars`: Sets characters that won't be escaped. Safe characters are the ranges 0..9, a..z and A..Z. These are always safe and should not be specified. (Default: `.-*_`)

```perl
uri_encode("<sourceField>")
uri_encode("<sourceField>"[, <options>...])
```

E.g.:

```perl
uri_encode("path.to.field", plus_for_space:"false", safe_chars:"")
```

### Selectors
Expand Down Expand Up @@ -852,4 +863,5 @@ Executes the functions if/unless the field value does not match the regular expr

##### `str_match`

Executes the functions if/unless the string matches the regular expression pattern.
Executes the functions if/unless the string matches the regular expression pattern.

0 comments on commit d45437a

Please sign in to comment.