Making .NET Data Types More Human With Humanizer
Create better user experiences that feel more human.
What you'll learn
Have you ever seen things like "view your order(s)" in an application? If we know how many orders there are, we should pluralize the word "order" appropriately. Another example is showing detailed dates and times when a more simple format like "2 days ago," "yesterday," or "tomorrow" is a more appropriate, more human representation of the data. Humanizer also makes it trivial to convert computerized strings such as Pascal case method names into normal sentences, or turn numeric values into word equivalents. It even makes it easy to work with byte sizes such as writing (10.605).Kilobytes() and creating strings such as "10.61 KB" or ".01 MB". Scenarios like these are made easy with Humanizer, without us having to write and test the code ourselves.
Table of contents
- Module Overview 2m
- Humanizing and Dehumanizing Strings 5m
- Transforming Lower, Upper, Sentence, and Title Case 2m
- Custom Transforms 3m
- Truncating Strings With Ellipsis and Custom Characters 6m
- Custom Truncation 3m
- A Shorthand for String.Format 1m
- Converting IEnumerable Collections to Sentences 3m
- Custom Collection Formatters 4m
- Pluralizing and Singularizing 2m
- Dasherize Strings 1m
- Module Summary 3m
- Module Overview 2m
- Converting Numbers to Words 5m
- Converting Numbers to Ordinal Strings 2m
- Converting Numbers to Ordinal Words 2m
- Humanize Quantities of Things 5m
- Converting To and From Roman Numerals 4m
- Humanizing Byte Values 5m
- Parsing Strings Into Byte Values 4m
- Humanizing Enum Values 4m
- Dehumanizing Enum Values 4m
- Module Summary 3m