forked from segmentio/go-camelcase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
31 lines (31 loc) · 1.51 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Package strcase implements fast snake_case, kebab-case, camelCase and PascalCase conversions.
// The `strcase` package provides utility functions for converting any strings to various case formats.
// It can convert any string to:
//
// - camelCase or lowerCamelCase
// - example: "theQuickBrownFoxJumpsOverTheLazyDog", `type myInternalType struct {}`
// - usage: Internal (private) variables, functions, methods, and types in Go
//
// - PascalCase or UpperCamelCase
// - example: "TheQuickBrownFoxJumpsOverTheLazyDog", `type MyExportedType struct {}`
// - usage: Exported (public) variables, functions, methods, and types in Go
//
// - snake_case
// - example: "the_quick_brown_fox_jumps_over_the_lazy_dog"
// - usage: naming convention in Python.
//
// - dash-case or kebab-case
// - "the-quick-brown-fox-jumps-over-the-lazy-dog"
// - usage: naming convention in CSS, also used in HTML and kubernetes manifests.
//
// Note:
//
// the "dash" is actually an ASCII hyphen a.k.a "hyphen-minus" a.k.a "minus sign", unicode `U+002D`,
// represented as `-` is often confused
// with "hyphen", unicode `U+2010`, represented as `‐`
// or with "En Dash" unicode `U+2013`, represented as `–` .
//
// see https://en.wikipedia.org/wiki/Dash#Unicode for more details
// and Unicode ASCII punctuation at https://www.unicode.org/charts/PDF/U0000.pdf for the full list of dashes.
// I'm no expert in this area, it seems quite complicated, so if you have any suggestions, please open an issue and let us know.
package strcase