語言

FileSystemName.MatchesSimpleExpression 方法

定義

驗證給定表達式是否與名稱相符。 支援以下萬用字元:「*」與「?」。 反斜線字元 '\' 逃脫了。

public static bool MatchesSimpleExpression(ReadOnlySpan<char> expression, ReadOnlySpan<char> name, bool ignoreCase = true);
static member MatchesSimpleExpression : ReadOnlySpan<char> * ReadOnlySpan<char> * bool -> bool
Public Shared Function MatchesSimpleExpression (expression As ReadOnlySpan(Of Char), name As ReadOnlySpan(Of Char), Optional ignoreCase As Boolean = true) As Boolean

參數

expression
ReadOnlySpan<Char>

那個表情可以搭配。

name
ReadOnlySpan<Char>

這個名字可以用這個表情來比對。

ignoreCase
Boolean

true 忽略格(缺席); false 是否匹配應為小寫區分。

傳回

true若給定表達式與名稱相符;否則,。 false

適用於