Skip to content

Conversation

@lavoiesl
Copy link
Contributor

@lavoiesl lavoiesl commented Jan 26, 2021

  • ToPascalCase, ToCamelCase, ToSnakeCase, and ToHeaderField will transform any input to that form.
  • Support for unicode runes
  • Support for all-uppercase initialisms, like mandated by the Go convention.
  • Expose IsInitialism
  • Expose SplitJoin, which can be used for any style of joins.
  • Emphasis on reducing allocations for memory efficiency.

@lavoiesl lavoiesl requested a review from a team January 26, 2021 18:29
"unicode"
)

func ToPascalCase(input string) string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something should say that those functions respect the Go initialisms pattern.
Either the package name, the method name, or at the very least the doc

Copy link
Contributor Author

@lavoiesl lavoiesl Mar 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

I could see something wanting or not wanting the go initialisms.

How about:

  • ToPascalCase
  • ToPascalGoCase
  • ToCamelCase
  • ToCamelGoCase
  • ToSnakeCase

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- `ToPascalCase`, `ToCamelCase`, and `ToSnakeCase` will transform any
  input to that form.
- Support for unicode runes
- Support for all-uppercase initialisms, like mandated by the Go convention.
- Expose `IsInitialism`
- Emphasis on reducing allocations for memory efficiency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants