Skip to content

Commit 46db944

Browse files
authored
Fix string Contains polyfills to honor StringComparison parameter (#3751)
1 parent 70b4498 commit 46db944

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Stack/Opc.Ua.Types/Polyfills/System.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static string ReplaceLineEndings(this string target, string replacementTe
7373
/// </summary>
7474
public static bool Contains(this string target, char value, StringComparison comparisonType)
7575
{
76-
return target.Contains(value);
76+
return target.IndexOf(value, comparisonType) >= 0;
7777
}
7878

7979
/// <summary>
@@ -84,7 +84,7 @@ public static bool Contains(
8484
string value,
8585
StringComparison comparisonType)
8686
{
87-
return target.Contains(value);
87+
return target.IndexOf(value, comparisonType) >= 0;
8888
}
8989

9090
/// <summary>

0 commit comments

Comments
 (0)