github.com/pojntfx/hydrapp/hydrapp@v0.0.0-20240516002902-d08759d6ca9f/pkg/utils/capitalize.go (about)

     1  package utils
     2  
     3  import "unicode"
     4  
     5  func Capitalize(msg string) string {
     6  	// Capitalize the first letter of the message if it is longer than two characters
     7  	if len(msg) >= 2 {
     8  		return string(unicode.ToUpper([]rune(msg)[0])) + msg[1:]
     9  	}
    10  
    11  	return msg
    12  }