Azure / Azure/bicep

capitalize() function

Open
#19,787 3 comments 3 reactions 0 assignees View on GitHub
enhancement intermediate language Needs: Upvote
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Is your feature request related to a problem? Please describe.**
We are sometimes using capitalization for strings in bicep and I was always wondering, why there is no capitalize() function.
Currently (via bicep console):
> var test = 'test'
> var capitalized = '${toUpper(substring(test, 0, 1))}${substring(test, 1)}'
> capitalized
'Test'

**Describe the solution you'd like**
A dedicated capitalize() function

Contributor guide

Open the contributing guide

Research direction

Start in the Bicep console by reproducing the current substring and toUpper workaround. Locate the existing string-function implementation and its tests, then add coverage for the requested capitalize() behavior and verify that the example produces 'Test'.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.