We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something that converts from CamelCase, snake_case, kebab-case to Sentence case
CamelCase
snake_case
kebab-case
Sentence case
e.g. ThisIsCamelCase to This is camel case
ThisIsCamelCase
This is camel case
func (i *input) SentenceCase(rule ...string) StringManipulation { input := getInput(*i) wordArray := caseHelper(input, false, rule...) i.Result = strings.Join(wordArray, " ") return i }
I have code like this but it is pretty ugly (converts to snake case then replaces _ with -):
_
-
s := stringy.New(str) str = strings.ReplaceAll(s.SnakeCase("?", "").ToLower(), "_", " ") return stringy.New(str).UcFirst()
Also it would be nice to be able to chain ToLower() w/o a new stringy.
ToLower()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Something that converts from
CamelCase
,snake_case
,kebab-case
toSentence case
e.g.
ThisIsCamelCase
toThis is camel case
I have code like this but it is pretty ugly (converts to snake case then replaces
_
with-
):Also it would be nice to be able to chain
ToLower()
w/o a new stringy.The text was updated successfully, but these errors were encountered: