Implements string functions widely used in other languages but absent in Go.
As ToCamelCase
is a port of RoR's String#camelize
, this change makes the return value of this method consistent with its origin. Thanks @dbainbri-ciena for raising this issue in #54.
This is a breaking API change. The return value of ToCamelCase("toCamelCase")
was Tocamelcase
and then it's ToCamelCase
now. If this change breaks your code, please let me know and open new issue against this change. Thanks.
See #46 for details. Thanks, @ninedraft.
Per @Ilyes512's request in #45, ToCamelCase
is aware of space and hyphen now. The conversion rule is updated in #1. ToSnakeCase
and ToKebabCase
are updated to convert all unicode space, including tab, CR, LF, etc, to underscore or hyphen according to the new rule.
I add a new method ToKababCase
as mentioned in #41 per @Ilyes512's request.
I also fix some issues #36 #38 #39 in this release. Thanks all guys who raised these issues to me.
I upgrade ToCamelCase
to support cases mentioned in #34 per @jhayotte's request.