FileSystemName.MatchesSimpleExpression 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
驗證給定表達式是否與名稱相符。 支援以下萬用字元:「*」與「?」。 反斜線字元 '\' 逃脫了。
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