Skip to content

Commit

Permalink
feat: Add eqFold template function
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenhilton committed Oct 5, 2022
1 parent 56bb4a5 commit 2c440ab
Show file tree
Hide file tree
Showing 5 changed files with 326 additions and 293 deletions.
15 changes: 15 additions & 0 deletions assets/chezmoi.io/docs/reference/templates/functions/eqFold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# `eqFold` *string1* *string2* [*extraString*...]

`eqFold` returns the boolean truth of comparing *string1* with *string2* and
any number of *extraString*s under Unicode case-folding.

!!! example

```
{{ $commandOutput := output "path/to/output-FOO.sh" }}
{{ if eqFold "foo" $commandOutput }}
# $commandOutput is "foo"/"Foo"/"FOO"...
{{ else if eqFold "bar" $commandOutput }}
# $commandOutput is "bar"/"Bar"/"BAR"...
{{ end }}
```
Loading

0 comments on commit 2c440ab

Please sign in to comment.