Pair functions
| Function Name | Description |
|---|---|
| find_pair | Searches an array of key-value pairs and finds the first pair that matches the specified key and value patterns. |
| pair | Creates a pair from a key and value. |
| parse_pair | Parses a string to form a pair. |
required or optional
- If it’s denoted by
requiredit means the argument must be passed into that function before it’ll work. - if it’s denoted by
optionalit means the function can work without passing the argument value.
pair
Creates a pair from a key and value.Arguments
| Name | Type | Required or Optional | Description |
|---|---|---|---|
| Key | string | Required | String for the key in the pair |
| Value | string | Required | String for the value in the pair |
| Separator | string | Optional (Default: ”:“) | Separator between the key and value in the pair |
Returns
Returns a pair with the key Key and the value Value with the separator Seperator.Examples
parse_pair
Creates a pair from a key and value.Arguments
| Name | Type | Required or Optional | Description |
|---|---|---|---|
| Pair | string | Required | String that has a pair of key value to pull out |
| Separator | string | Optional (Default: ”:“) | Separator between the key and value in the pair |