Skip to content
New issue

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

Pascalize a kebab-cased string returns a Kebab-Cased string. #1282

Closed
Nefcanto opened this issue Jul 1, 2023 · 2 comments · Fixed by #1299
Closed

Pascalize a kebab-cased string returns a Kebab-Cased string. #1282

Nefcanto opened this issue Jul 1, 2023 · 2 comments · Fixed by #1299

Comments

@Nefcanto
Copy link

Nefcanto commented Jul 1, 2023

Simply run this code:

var kebabed = "some-text-here";
var pascalized = kebabed.Pascalize();
Console.WriteLine(pascalized);
// prints Some-Text-Here instead of SomeTextHere
@gregsdennis
Copy link

Workaround:

var pascalized = kebabed.Underscore().Pascalize();

This is not ideal as it now has to process the string twice (more time/allocations).

@dramlian
Copy link
Contributor

dramlian commented Oct 9, 2023

I handeled this problem in this PR: #1299

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 a pull request may close this issue.

4 participants