Humanizer icon indicating copy to clipboard operation
Humanizer copied to clipboard

Humanize string without changing case LetterCasing.NoChange

Open failwyn opened this issue 7 years ago • 4 comments

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

failwyn avatar Jan 17 '19 18:01 failwyn

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 => ???

lauren-van-sloun avatar Jan 17 '19 22:01 lauren-van-sloun

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 [email protected] 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.

failwyn avatar Jan 17 '19 23:01 failwyn

@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

AKTheKnight avatar Mar 04 '19 16:03 AKTheKnight

Hi, Sorry for my (very) late contribution but I'm facing a similar problem: I would like to tell the "Humanizer" that it should consider IoT as a single word for exemple. Then "IoTDeviceProcessing".Humanize() should return "IoT device processing"

vivelys avatar May 21 '25 22:05 vivelys