Decapitalizes the first letter of a string.

Use strings.ToLower() to decapitalize the first letter of the string.

代码实现

import "strings"

func Decapitalize(s string) string {
    return strings.ToLower(s[0:1]) + s[1:]
}

使用样例

Decapitalize("Boomerang") // "boomerang"