Skip to content

Commit 81e0526

Browse files
authored
Merge pull request #124680 from johnlokerse/johnlokerse/consistent-empty-function-docs
Consistency updates of string and array empty() function
2 parents 0579359 + 9cdcb6b commit 81e0526

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

articles/azure-resource-manager/bicep/bicep-functions-array.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,19 @@ The output from the preceding example with the default values is:
158158

159159
`empty(itemToTest)`
160160

161-
Determines if an array, object, or string is empty.
161+
Determines if an array, object, or string is empty or null.
162162

163163
Namespace: [sys](bicep-functions.md#namespaces-for-functions).
164164

165165
### Parameters
166166

167167
| Parameter | Required | Type | Description |
168168
|:--- |:--- |:--- |:--- |
169-
| itemToTest |Yes |array, object, or string |The value to check if it's empty. |
169+
| itemToTest |Yes |array, object, or string |The value to check if it's empty or null. |
170170

171171
### Return value
172172

173-
Returns **True** if the value is empty; otherwise, **False**.
173+
Returns **True** if the value is empty or null; otherwise, **False**.
174174

175175
### Example
176176

@@ -180,10 +180,12 @@ The following example checks whether an array, object, and string are empty.
180180
param testArray array = []
181181
param testObject object = {}
182182
param testString string = ''
183+
param testNullString string?
183184
184185
output arrayEmpty bool = empty(testArray)
185186
output objectEmpty bool = empty(testObject)
186187
output stringEmpty bool = empty(testString)
188+
output stringNull bool = empty(testNullString)
187189
```
188190

189191
The output from the preceding example with the default values is:
@@ -193,6 +195,7 @@ The output from the preceding example with the default values is:
193195
| arrayEmpty | Bool | True |
194196
| objectEmpty | Bool | True |
195197
| stringEmpty | Bool | True |
198+
| stringNull | Bool | True |
196199

197200
### Quickstart examples
198201

articles/azure-resource-manager/bicep/bicep-functions-string.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,19 +331,19 @@ The output from the preceding example with the default values is:
331331

332332
`empty(itemToTest)`
333333

334-
Determines if an array, object, or string is empty.
334+
Determines if an array, object, or string is empty or null.
335335

336336
Namespace: [sys](bicep-functions.md#namespaces-for-functions).
337337

338338
### Parameters
339339

340340
| Parameter | Required | Type | Description |
341341
|:--- |:--- |:--- |:--- |
342-
| itemToTest |Yes |array, object, or string |The value to check if it's empty. |
342+
| itemToTest |Yes |array, object, or string |The value to check if it's empty or null. |
343343

344344
### Return value
345345

346-
Returns `True` if the value is empty; otherwise, `False`.
346+
Returns **True** if the value is empty or null; otherwise, **False**.
347347

348348
### Examples
349349

@@ -353,10 +353,12 @@ The following example checks whether an array, object, and string are empty.
353353
param testArray array = []
354354
param testObject object = {}
355355
param testString string = ''
356+
param testNullString string?
356357
357358
output arrayEmpty bool = empty(testArray)
358359
output objectEmpty bool = empty(testObject)
359360
output stringEmpty bool = empty(testString)
361+
output stringNull bool = empty(testNullString)
360362
```
361363

362364
The output from the preceding example with the default values is:
@@ -366,6 +368,7 @@ The output from the preceding example with the default values is:
366368
| arrayEmpty | Bool | True |
367369
| objectEmpty | Bool | True |
368370
| stringEmpty | Bool | True |
371+
| stringNull | Bool | True |
369372

370373
## endsWith
371374

0 commit comments

Comments
 (0)