Skip to content
Snippets Groups Projects
Commit 8916081d authored by AdminXVII's avatar AdminXVII
Browse files

Add a description of the or method in the manual

parent 36866422
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,7 @@ The following are the currently-supported string methods:
- [to_uppercase](#to_uppercase)
- [escape](#escape)
- [unescape](#unescape)
- [or](#or)
### ends_with
......@@ -451,6 +452,25 @@ echo $unescape($line)
lamb
```
### or
Defaults to string variables. Fallback to a given value if the variable is not defined
#### Example
```
echo $or($unknown_variable "Fallback")
let var = 42
echo $or($var "Not displayed")
```
#### Output
```
Fallback
42
```
## Array Methods
The following are the currently-supported array methods.
......@@ -612,3 +632,4 @@ echo @reverse([1 2 3])
```
3 2 1
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment