Files
buildx/vendor/github.com/zclconf/go-cty/cty/ctystrings/normalize.go
2023-10-19 14:49:10 +02:00

15 lines
385 B
Go

package ctystrings
import (
"golang.org/x/text/unicode/norm"
)
// Normalize applies NFC normalization to the given string, returning the
// transformed string.
//
// This function achieves the same effect as wrapping a string in a value
// using [cty.StringVal] and then unwrapping it again using [Value.AsString].
func Normalize(str string) string {
return norm.NFC.String(str)
}