String Extensions Examples

var s = "hello!  ";
			
var crypt = s.EncryptAsString("random salt");
var decrypt = crypt.DecryptAsString("random salt");
			
var sha256 = s.Sha256();
var sha1 = s.Sha1();
var md5 = s.MD5();

var sub="www.yahoo.com".ExtractSubdomain();
var slug="A title".MakeSlug();
			
var notTrue = s.IsEmail();
			
var isTrue = "            ".IsTrimmedNullOrEmpty();
			
var namedFormat = "Hello {name}!".HenriFormat(new {name = "World"});
			
int id = "3".Parse<int>();

CultureInfo culture = "en".ParseCulture();

Last edited Jan 21, 2011 at 12:06 PM by mike_sapiens, version 2

Comments

No comments yet.