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

Dehumanize() doesn't get rid of forward slash in input string. #1289

Open
Drake53 opened this issue Aug 1, 2023 · 0 comments
Open

Dehumanize() doesn't get rid of forward slash in input string. #1289

Drake53 opened this issue Aug 1, 2023 · 0 comments

Comments

@Drake53
Copy link

Drake53 commented Aug 1, 2023

I'm using the Dehumanize() method to generate enum member identifier names. I came across an example where the resulting string contains a forward slash /, which is not a valid identifier name. Simplified example:

Assert.Equal("HelloTheWorld", "Hello/The-World".Dehumanize());

It seems the - is handled in some special way causing this behaviour.

Workaround: Invoke Dehumanize twice: "Hello/The-World".Dehumanize().Dehumanize();

Version: Humanizer.Core 2.14.1

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

No branches or pull requests

1 participant