I'm writing a library of Extension Methods for String and DateTime utility functions in C#. Can you please help me out by suggesting the useful utlity functions for String and DateTime you may want to be part of it ? With your suggestions I can make it more cohesive and Collective.
Thanks!
public static bool IsNullOrEmpty(this string value){
return string.IsNullOrEmpty(value);
}
public static string Reverse(this string value) {
if (!string.IsNullOrEmpty(value)) {
char[] chars = value.ToCharArray();
Array.Reverse(chars);
value = new string(chars);
}
return value;
}
public static string ToTitleCase(this string value) {
return CultureInfo.CurrentCulture.TextInfo.ToTitleCase(value);
}
public static string ToTitleCaseInvariant(this string value) {
return CultureInfo.InvariantCulture.TextInfo.ToTitleCase(value);
}
Trivial, but slighty nicer to call.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With