コード例 #1
0
 /// <summary>
 /// Converts string to lowercase.
 /// </summary>
 public static string ToLowercase(this String value)
 {
     Argument.CheckIfNull(value, "value");
     return(value.ToLower(CultureInfo.CurrentCulture));
 }
コード例 #2
0
 /// <summary>
 /// Determines whether [is all lower case] [the specified value].
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns></returns>
 public static bool IsAllLowercase(this String value)
 {
     Argument.CheckIfNull(value, "value");
     return(string.Equals(value.ToLower(CultureInfo.CurrentCulture), value, StringComparison.CurrentCulture));
 }
コード例 #3
0
 /// <summary>
 /// Formats the specified value.
 /// </summary>
 public static string FormatWith(this String value, params object[] args)
 {
     Argument.CheckIfNull(value, "value");
     return(string.Format(CultureInfo.CurrentCulture, value, args));
 }
コード例 #4
0
 /// <summary>
 /// Removes special characters from the string
 /// </summary>
 public static string RemoveLineBreaksAndCarriageReturnCharacters(this string input)
 {
     Argument.CheckIfNull(input, "input");
     return(input.Replace("\n", string.Empty).Replace("\r", string.Empty));
 }