ContainsF、质数分解、计算最大公约数
This commit is contained in:
1 parent
7bc61645d5
commit
86263b0b75
2 files changed
+47
No files matched your search
@@ -37,6 +37,12 @@ public static class StringExtensions {
|
||||
public static bool ContainsIgnoreCase(this string value, string subString)
|
||||
=> value.IndexOf(subString, StringComparison.OrdinalIgnoreCase) >= 0;
|
||||
|
||||
/// <summary>
|
||||
/// 非区域性的 <see cref="string.Contains(string)"/>。
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool ContainsF(this string? value, string subString, bool ignoreCase = false)
|
||||
=> value?.IndexOf(subString, ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal) >= 0;
|
||||
|
||||
/// <summary>
|
||||
/// 非区域性的 <see cref="string.IndexOf(string)"/>。
|
||||
|
||||
Reference in new issue
Block a user