| 98 | } |
| 99 | |
| 100 | bool FindMatch::isMatch( const char *exp, const char *str, bool caseSensitive ) |
| 101 | { |
| 102 | while ( *str && ( *exp != '*' ) ) |
| 103 | { |
| 104 | if ( !IsCharMatch( *exp++, *str++, caseSensitive ) ) |
| 105 | return false; |
| 106 | } |
| 107 | |
| 108 | const char* cp = NULL; |
| 109 | const char* mp = NULL; |
| 110 | |
| 111 | while ( *str ) |
| 112 | { |
| 113 | if ( *exp == '*' ) |
| 114 | { |
| 115 | if ( !*++exp ) |
| 116 | return true; |
| 117 | |
| 118 | mp = exp; |
| 119 | cp = str+1; |
| 120 | } |
| 121 | else if ( IsCharMatch( *exp, *str, caseSensitive ) ) |
| 122 | { |
| 123 | exp++; |
| 124 | str++; |
| 125 | } |
| 126 | else |
| 127 | { |
| 128 | exp = mp; |
| 129 | str = cp++; |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | while ( *exp == '*' ) |
| 134 | exp++; |
| 135 | |
| 136 | return !*exp; |
| 137 | } |
| 138 | |
| 139 | |
| 140 | bool FindMatch::isMatchMultipleExprs( const char *exps, const char *str, bool caseSensitive ) |
nothing calls this directly
no test coverage detected