Skip to content

Killer extension methods for .net, especially strings. For example, instead of if !string.IsNullOrEmpty(foo), you can write foo.HasChars(). All you need to do is drop Steveo.Wetnap.dll into one of your projects and you're good to go. BTW, it's called wetnap because it's a nice luxury to have, just like a wet nap after a plate of hot wings. It's …

Notifications You must be signed in to change notification settings

StevePotter/Wetnap

Repository files navigation

Does seeing !string.IsNullOrEmpty and "if (foo.IndexOf(bar)…" all over your code base make you sick to your stomach?  Then, you're in luck!

Wetnap is a lightweight of .net extension methods that make coding, especially with strings, a bit easier.  It has all kinds of cool nuggets for testing, splitting, and combining strings.  Some highlights:

   * !string.IsNullOrEmpty(foo) becomes simply foo.HasChars()

   * "www.google.com".After("www.") is "google.com"
   * "ate hot dogs".StartWith("hate") is "hate hot dogs"
   * "*feature".Surround("**") is "**feature**"
   * "aaabaa".StartWithout("a") is "baa"

And it goes on.  Wetnap is a simple drop-in library, available as a nuget package.  Include it in your project and you are set…no namespaces to import and Wetnap won't interfere with existing stuff.

Open source and fully tested, Wetnap makes .net even better.  

About

Killer extension methods for .net, especially strings. For example, instead of if !string.IsNullOrEmpty(foo), you can write foo.HasChars(). All you need to do is drop Steveo.Wetnap.dll into one of your projects and you're good to go. BTW, it's called wetnap because it's a nice luxury to have, just like a wet nap after a plate of hot wings. It's …

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages