mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 18:13:42 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			385 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			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)
 | 
						|
}
 |