次の方法で共有


MSBuildGlobWithGaps.IsMatch(String) Method

Definition

Matches the given stringToMatch against the glob.

public:
 virtual bool IsMatch(System::String ^ stringToMatch);
public bool IsMatch (string stringToMatch);
abstract member IsMatch : string -> bool
override this.IsMatch : string -> bool
Public Function IsMatch (stringToMatch As String) As Boolean

Parameters

stringToMatch
String

The string to match. If the string represents a relative path, it will get normalized against the glob's root. Cannot be null.

Returns

false if stringToMatch contains invalid path or file characters; true otherwise.

Implements

Remarks

Matching is path aware:

  • Slashes are normalized.
  • Arguments representing relative paths are normalized against the glob's root.

For example, the glob **/*.cs does not match ../a.cs, since ../a.cs points outside of the glob root.

Applies to