> ## Documentation Index
> Fetch the complete documentation index at: https://errand.nuvrel.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# lower

> Convert a string to lowercase.

`lower(str)` returns a copy of `str` with all letters converted to lowercase.

## Signature

```
lower(str string) string
```

## Example

Normalize a branch name to lowercase before using it as a Docker image tag. Branch names may contain uppercase letters from conventions like `feature/UserAuth`, which are not valid in image tag format:

```hcl theme={null}
variable "branch" {
  description = "Git branch name"
  type        = string
}

computed "image_tag" {
  description = "Docker-safe image tag from the branch name"
  expression  = lower(replace(var.branch, "/", "-"))
}

task "build" {
  description = "Build a branch-tagged Docker image"
  commands    = ["docker build -t myapp:${computed.image_tag} ."]
}
```

`feature/UserAuth` becomes `feature-userauth`.

## Notes

* `lower` converts all Unicode letters, not just ASCII.
* Pair `lower` with [`replace`](/functions/string/replace) or [`regexreplace`](/functions/string/regexreplace) to sanitize strings for use in identifiers, tags, or filenames.
