Humanizr / Humanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities
Other
8.69k stars 964 forks source link

Humanize string without changing case LetterCasing.NoChange #777

Open failwyn opened 5 years ago

failwyn commented 5 years ago

It would be nice to have the ability to Humanize a string without making any changes to the casing.

lauren-van-sloun commented 5 years ago

I'm not sure what kind of output you're expecting.

I can guess at some simple cases, for example:

SomeString => Some String
someOther string => some Other string
lower case statement => lower case statement

But what about input like this? Would it just return an unchanged string?

nOt SuRe AbOuT tHiS oNe => ???
failwyn commented 5 years ago

Our use case is that Humanizer is wrapped in a Localize utility function that will be passed database column names (i.e. CreatedOn) that should come back Title case as they are defined in the database, but it will also be passed strings that will be mixed case with spaces or underscores, and we’d like them back in the same case as they were defined.

On Jan 17, 2019, at 5:38 PM, Lauren Van Sloun notifications@github.com wrote:

I'm not sure what kind of output you're expecting.

I can guess at some simple cases, for example:

SomeString => Some String someOther string => some Other string lower case statement => lower case statement But what about input like this? Would it just return an unchanged string?

nOt SuRe AbOuT tHiS oNe => ??? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

AKTheKnight commented 5 years ago

@failwyn Could you possibly post some examples? From that we might be able to better understand what you need and then how we can help