Humanizer icon indicating copy to clipboard operation
Humanizer copied to clipboard

Problem in Camelize method

Open Nefcanto opened this issue 1 year ago • 8 comments

Simply run this code:

var kebabed = "some-text-here"; var camelized = kebabed.Camelize(); Console.WriteLine(camelized); // prints some-text-here instead of someTextHere

var dotted = "some.text.here"; var camelized = dotted.Camelize(); Console.WriteLine(camelized); // prints some.text.here instead of someTextHere

Nefcanto avatar Feb 17 '24 10:02 Nefcanto

@hazzik @hangy @MehdiK any opinions on what should be the correct behavior in this scenario

SimonCropp avatar Feb 21 '24 01:02 SimonCropp

@SimonCropp, I have also reported https://github.com/Humanizr/Humanizer/issues/1282.

The point is, the camelCasing, PascalCasing, kebab-casing, and snake_casing conventions are clear. The source should be converted into the target. In the camelCasing convention, you should only see alphanumeric characters, and no hyphens or underline should exist between words.

Nefcanto avatar Feb 21 '24 05:02 Nefcanto