Skip to content

Commit 5ff9e4b

Browse files
committed
Add some details for the URI function
1 parent a73f943 commit 5ff9e4b

File tree

2 files changed

+28
-27
lines changed

2 files changed

+28
-27
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Bicep functions - string
33
description: Describes the functions to use in a Bicep file to work with strings.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 01/31/2024
6+
ms.date: 07/02/2024
77
---
88

99
# String functions for Bicep
@@ -213,7 +213,7 @@ Namespace: [sys](bicep-functions.md#namespaces-for-functions).
213213

214214
### Return value
215215

216-
**True** if the item is found; otherwise, **False**.
216+
`True` if the item is found; otherwise, `False`.
217217

218218
### Examples
219219

@@ -343,7 +343,7 @@ Namespace: [sys](bicep-functions.md#namespaces-for-functions).
343343

344344
### Return value
345345

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

348348
### Examples
349349

@@ -384,7 +384,7 @@ Namespace: [sys](bicep-functions.md#namespaces-for-functions).
384384

385385
### Return value
386386

387-
**True** if the last character or characters of the string match the value; otherwise, **False**.
387+
`True` if the last character or characters of the string match the value; otherwise, `False`.
388388

389389
### Examples
390390

@@ -1033,7 +1033,7 @@ Namespace: [sys](bicep-functions.md#namespaces-for-functions).
10331033

10341034
### Return value
10351035

1036-
**True** if the first character or characters of the string match the value; otherwise, **False**.
1036+
`True` if the first character or characters of the string match the value; otherwise, `False`.
10371037

10381038
### Examples
10391039

@@ -1391,29 +1391,29 @@ Namespace: [sys](bicep-functions.md#namespaces-for-functions).
13911391
| baseUri |Yes |string |The base uri string. Take care to observe the behavior regarding the handling of the trailing slash ('/'), as described following this table. |
13921392
| relativeUri |Yes |string |The relative uri string to add to the base uri string. |
13931393

1394-
* If **baseUri** ends in a trailing slash, the result is simply
1395-
**baseUri** followed by **relativeUri**.
1394+
* If `baseUri` ends with a trailing slash, the result is simply `baseUri` followed by `relativeUri`. If `relativeUri` also begins with a leading slash, the trailing slash and the leading slash will be combined into one.
13961395

1397-
* If **baseUri** does not end in a trailing slash one of two things
1396+
* If `baseUri` does not end in a trailing slash one of two things
13981397
happens.
13991398

1400-
* If **baseUri** has no slashes at all (aside from the "//" near
1401-
the front) the result is simply **baseUri** followed by **relativeUri**.
1399+
* If `baseUri` has no slashes at all (aside from the "//" near
1400+
the front) the result is simply `baseUri` followed by `relativeUri`.
14021401

1403-
* If **baseUri** has some slashes, but doesn't end with a slash,
1404-
everything from the last slash onward is removed from **baseUri**
1405-
and the result is **baseUri** followed by **relativeUri**.
1402+
* If `baseUri` has some slashes, but doesn't end with a slash,
1403+
everything from the last slash onward is removed from `baseUri`
1404+
and the result is `baseUri` followed by `relativeUri`.
14061405

14071406
Here are some examples:
14081407

14091408
```
14101409
uri('http://contoso.org/firstpath', 'myscript.sh') -> http://contoso.org/myscript.sh
14111410
uri('http://contoso.org/firstpath/', 'myscript.sh') -> http://contoso.org/firstpath/myscript.sh
1411+
uri('http://contoso.org/firstpath/', '/myscript.sh') -> http://contoso.org/firstpath/myscript.sh
14121412
uri('http://contoso.org/firstpath/azuredeploy.json', 'myscript.sh') -> http://contoso.org/firstpath/myscript.sh
14131413
uri('http://contoso.org/firstpath/azuredeploy.json/', 'myscript.sh') -> http://contoso.org/firstpath/azuredeploy.json/myscript.sh
14141414
```
14151415

1416-
For complete details, the **baseUri** and **relativeUri** parameters are
1416+
For complete details, the `baseUri` and `relativeUri` parameters are
14171417
resolved as specified in
14181418
[RFC 3986, section 5](https://tools.ietf.org/html/rfc3986#section-5).
14191419

articles/azure-resource-manager/templates/template-functions-string.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Template functions - string
33
description: Describes the functions to use in an Azure Resource Manager template (ARM template) to work with strings.
44
ms.topic: reference
55
ms.custom: devx-track-arm-template
6-
ms.date: 01/31/2024
6+
ms.date: 07/02/2024
77
---
88

99
# String functions for ARM templates
@@ -205,7 +205,7 @@ In Bicep, use the [contains](../bicep/bicep-functions-string.md#contains) functi
205205

206206
### Return value
207207

208-
**True** if the item is found; otherwise, **False**.
208+
`True` if the item is found; otherwise, `False`.
209209

210210
### Examples
211211

@@ -302,7 +302,7 @@ In Bicep, use the [empty](../bicep/bicep-functions-string.md#empty) function.
302302

303303
### Return value
304304

305-
Returns **True** if the value is empty; otherwise, **False**.
305+
Returns `True` if the value is empty; otherwise, `False`.
306306

307307
### Examples
308308

@@ -335,7 +335,7 @@ In Bicep, use the [endsWith](../bicep/bicep-functions-string.md#endswith) functi
335335

336336
### Return value
337337

338-
**True** if the last character or characters of the string match the value; otherwise, **False**.
338+
`True` if the last character or characters of the string match the value; otherwise, `False`.
339339

340340
### Examples
341341

@@ -841,7 +841,7 @@ In Bicep, use the [startsWith](../bicep/bicep-functions-string.md#startswith) fu
841841

842842
### Return value
843843

844-
**True** if the first character or characters of the string match the value; otherwise, **False**.
844+
`True` if the first character or characters of the string match the value; otherwise, `False`.
845845

846846
### Examples
847847

@@ -1142,28 +1142,29 @@ In Bicep, use the [uri](../bicep/bicep-functions-string.md#uri) function.
11421142
| baseUri |Yes |string |The base uri string. Take care to observe the behavior about the handling of the trailing slash (`/`), as described following this table. |
11431143
| relativeUri |Yes |string |The relative uri string to add to the base uri string. |
11441144

1145-
* If **baseUri** ends in a trailing slash, the result is **baseUri** followed by **relativeUri**.
1145+
* If `baseUri` ends with a trailing slash, the result is simply `baseUri` followed by `relativeUri`. If `relativeUri` also begins with a leading slash, the trailing slash and the leading slash will be combined into one.
11461146

1147-
* If **baseUri** doesn't end in a trailing slash one of two things
1147+
* If `baseUri` doesn't end in a trailing slash one of two things
11481148
happens.
11491149

1150-
* If **baseUri** has no slashes at all (aside from the `//` near
1151-
the front) the result is **baseUri** followed by **relativeUri**.
1150+
* If `baseUri` has no slashes at all (aside from the `//` near
1151+
the front) the result is `baseUri` followed by `relativeUri`.
11521152

1153-
* If **baseUri** has some slashes, but doesn't end with a slash,
1154-
everything from the last slash onward is removed from **baseUri**
1155-
and the result is **baseUri** followed by **relativeUri**.
1153+
* If `baseUri` has some slashes, but doesn't end with a slash,
1154+
everything from the last slash onward is removed from `baseUri`
1155+
and the result is `baseUri` followed by `relativeUri`.
11561156

11571157
Here are some examples:
11581158

11591159
```
11601160
uri('http://contoso.org/firstpath', 'myscript.sh') -> http://contoso.org/myscript.sh
11611161
uri('http://contoso.org/firstpath/', 'myscript.sh') -> http://contoso.org/firstpath/myscript.sh
1162+
uri('http://contoso.org/firstpath/', '/myscript.sh') -> http://contoso.org/firstpath/myscript.sh
11621163
uri('http://contoso.org/firstpath/azuredeploy.json', 'myscript.sh') -> http://contoso.org/firstpath/myscript.sh
11631164
uri('http://contoso.org/firstpath/azuredeploy.json/', 'myscript.sh') -> http://contoso.org/firstpath/azuredeploy.json/myscript.sh
11641165
```
11651166

1166-
For complete details, the **baseUri** and **relativeUri** parameters are
1167+
For complete details, the `baseUri` and `relativeUri` parameters are
11671168
resolved as specified in
11681169
[RFC 3986, section 5](https://tools.ietf.org/html/rfc3986#section-5).
11691170

0 commit comments

Comments
 (0)