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