[#BloombergLP-ball-PatternUtil-isMatch]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/PatternUtil.adoc[PatternUtil]::isMatch
:relfileprefix: ../../../
:mrdocs:

Return `true` if `pattern` matches `inputString`, and `false` otherwise&period;

== Synopsis

Declared in `&lt;ball&lowbar;patternutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
bool
isMatch(
    char const* inputString,
    char const* pattern);
----

== Description

Return `true` if the specified `pattern` matches the specified `inputString`, and `false` if the pattern does not match or is invalid&period; There are two types of escape sequences that are allowed in `pattern`&period; (See the function&hyphen;level documentation of `PatternUtil&colon;&colon;isValidPattern` for the definition of invalid patterns&period;) A &apos;&ast;` escape sequence in `pattern&apos; matches a single `&ast;` in `inputString`&period; A &apos;&apos; escape sequence in `pattern` matches a single &apos;&apos; in `inputString`&period; If `pattern` ends with an unescaped `&ast;`, then `pattern` matches `inputString` if the string indicated by `pattern` (after escape sequence processing) with the final `&ast;` removed is a prefix of `inputString`&period; Otherwise `pattern` matches `inputString` only if the string indicated by `pattern` (after escape sequence processing) and `inputString` are the same&period; The behavior is undefined unless both `inputString` and `pattern` are null&hyphen;terminated c&hyphen;style strings&period;

== Return Value

`true` if `pattern` matches `inputString`, and `false` otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *inputString*
| null&hyphen;terminated string to match against
| *pattern*
| null&hyphen;terminated pattern, possibly with escapes or `&ast;`
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
