Skip to content
Permalink
Browse files

doesn't work as expected on linux with C locale

  • Loading branch information...
edyoung committed May 12, 2019
1 parent a1970f5 commit bb628f8259b75b069b6cc9dab051de46ddd1f809
@@ -342,14 +342,14 @@ public static bool EqualsIgnoreEndSlash(this string source, string input)
}

public static bool IsTrue(this string text) {
return !string.IsNullOrWhiteSpace(text) && text.Equals("true", StringComparison.CurrentCultureIgnoreCase);
return !string.IsNullOrWhiteSpace(text) && text.Equals("true", StringComparison.OrdinalIgnoreCase);
}

public static bool? IsTruePreserveNull(this string text) {
if (text == null) {
return null;
}
return !string.IsNullOrWhiteSpace(text) && text.Equals("true", StringComparison.CurrentCultureIgnoreCase);
return !string.IsNullOrWhiteSpace(text) && text.Equals("true", StringComparison.OrdinalIgnoreCase);
}

/// <summary>
@@ -192,7 +192,7 @@ public static bool EqualsIgnoreCase(this string str, string str2)

public static bool IsTrue(this string text)
{
return !string.IsNullOrWhiteSpace(text) && text.Equals("true", StringComparison.CurrentCultureIgnoreCase);
return !string.IsNullOrWhiteSpace(text) && text.Equals("true", StringComparison.OrdinalIgnoreCase);
}

public static bool CompareVersion(this string version1, string version2)

0 comments on commit bb628f8

Please sign in to comment.
You can’t perform that action at this time.