go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

CamelCase test case

Open ronething-bot opened this issue 2 years ago • 4 comments

core/stringx/strings.go

// ToCamelCase returns the string that converts the first letter to lowercase.
func ToCamelCase(s string) string {
	for i, v := range s {
		return string(unicode.ToLower(v)) + s[i+1:]
	}

	return ""
}
  • CamelCase 的定义是否有歧义,应该不是首字母小写而已?

https://en.wikipedia.org/wiki/Camel_case

Camel case (sometimes stylized as camelCase or CamelCase, also known as camel caps or more formally as medial capitals) is the practice of writing phrases without spaces or punctuation.

test case 中, hello_world 作为 snake 命名风格,应该是转变为 helloWorld 而不是 hello_world?

其他 test case 类似

ronething-bot avatar Nov 22 '22 02:11 ronething-bot

capitalizing the first letter, it means is public

Verystone avatar Nov 22 '22 06:11 Verystone

I'm going to remove it. Thanks for pointing it out.

kevwan avatar Nov 27 '22 00:11 kevwan

remove what? test case or func.

ronething-bot avatar Dec 06 '22 02:12 ronething-bot

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Dec 07 '23 01:12 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Mar 27 '24 01:03 github-actions[bot]