mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
code style
This commit is contained in:
@@ -29,8 +29,16 @@ internal static class StringExtension
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EqualsAny(this string source, string[] values, StringComparison comparisonType)
|
||||
public static bool EqualsAny(this string source, in ReadOnlySpan<string> values, StringComparison comparisonType)
|
||||
{
|
||||
return values.Any(value => source.Equals(value, comparisonType));
|
||||
foreach (ref readonly string value in values)
|
||||
{
|
||||
if (source.Equals(value, comparisonType))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user