mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 00:50:25 +02:00
Add ignore case option for StringView.Contains
... and remove unnecessary overload on String.Contains, allowing StringView to also be used.
This commit is contained in:
parent
46fbba9712
commit
5e78e24fe8
1 changed files with 3 additions and 8 deletions
|
@ -1429,12 +1429,7 @@ namespace System
|
|||
return -1;
|
||||
}
|
||||
|
||||
public bool Contains(String str)
|
||||
{
|
||||
return IndexOf(str) != -1;
|
||||
}
|
||||
|
||||
public bool Contains(String str, bool ignoreCase)
|
||||
public bool Contains(StringView str, bool ignoreCase = false)
|
||||
{
|
||||
return IndexOf(str, ignoreCase) != -1;
|
||||
}
|
||||
|
@ -3291,9 +3286,9 @@ namespace System
|
|||
return false;
|
||||
}
|
||||
|
||||
public bool Contains(StringView stringView)
|
||||
public bool Contains(StringView stringView, bool ignoreCase = false)
|
||||
{
|
||||
return IndexOf(stringView) != -1;
|
||||
return IndexOf(stringView, ignoreCase) != -1;
|
||||
}
|
||||
|
||||
public bool StartsWith(StringView b, StringComparison comparisonType = StringComparison.Ordinal)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue