String Provider¶
String manipulation and random string generators.
Hooks¶
Type | Description | Return |
---|---|---|
base64_decode | Hook for base64_decode . Base64 decodes a string. |
str |
base64_encode | Hook for base64_encode . Base64 encodes a string. |
str |
ends_with | Hook checking if a string ends with another string.Docs | None |
join | Join a list of strings with a separator. | None |
random_hex | Hook for random_hex . Lists the contents of a directory. |
str |
random_string | Hook for random_string . Lists the contents of a directory. |
str |
regex_match | Hook running a regex against a string.Docs | None |
split | Hook for splitting a string into as list based on a separator. | None |
starts_with | Hook checking if a string starts with another string.Docs | None |
Examples¶
split¶
Splits a string into a list based on a separator
compact->: split stuff-and-things -
expanded:
->: split
input: stuff-and-things
separator: "-"
compact:
- stuff
- and
- things
expanded:
- stuff
- and
- things
join¶
Joins a list of strings into a single string
compact->: join ['stuff','and','things']
expanded:
->: join
input:
- stuff
- and
- things
separator: -
compact: stuff/and/things
expanded: stuff-and-things
random_string¶
Creates a random string of letters and digits
compact->: random_string
expanded:
->: random_string
length: 4
case: upper
compact: ab7dhfo0
expanded: AB7D
random_hex¶
Creates a random hex of letters and digits
compact->: random_hex 4
expanded:
->: random_hex
length: 4
compact: a01f
expanded: a01f