@@ -69,32 +69,34 @@ The output from the preceding example with the default values is:
69
69
70
70
` empty(itemToTest) `
71
71
72
- Determines if an array, object, or string is empty.
72
+ Determines if an array, object, or string is empty or null .
73
73
74
74
Namespace: [ sys] ( bicep-functions.md#namespaces-for-functions ) .
75
75
76
76
### Parameters
77
77
78
78
| Parameter | Required | Type | Description |
79
79
| :--- | :--- | :--- | :--- |
80
- | itemToTest | Yes | array, object, or string | The value to check if it's empty. |
80
+ | itemToTest | Yes | array, object, or string | The value to check if it's empty or null . |
81
81
82
82
### Return value
83
83
84
- Returns ** True** if the value is empty; otherwise, ** False** .
84
+ Returns ** True** if the value is empty or null ; otherwise, ** False** .
85
85
86
86
### Example
87
87
88
- The following example checks whether an array, object, and string are empty.
88
+ The following example checks whether an array, object, and string are empty or null .
89
89
90
90
``` bicep
91
91
param testArray array = []
92
92
param testObject object = {}
93
93
param testString string = ''
94
+ param testNullString string?
94
95
95
96
output arrayEmpty bool = empty(testArray)
96
97
output objectEmpty bool = empty(testObject)
97
98
output stringEmpty bool = empty(testString)
99
+ output stringNull bool = empty(testNullString)
98
100
```
99
101
100
102
The output from the preceding example with the default values is:
@@ -104,6 +106,7 @@ The output from the preceding example with the default values is:
104
106
| arrayEmpty | Bool | True |
105
107
| objectEmpty | Bool | True |
106
108
| stringEmpty | Bool | True |
109
+ | stringNull | Bool | True |
107
110
108
111
## intersection
109
112
0 commit comments