| 188 | } |
| 189 | |
| 190 | virtual bool result() |
| 191 | { |
| 192 | UCharBuffer utfBuffer; |
| 193 | const auto charSetId = textType->getCharSet()->getId(); |
| 194 | UCharBuffer* bufferPtr = &buffer; |
| 195 | |
| 196 | if (charSetId != CS_NONE && charSetId != CS_BINARY && charSetId != CS_UTF8) |
| 197 | { |
| 198 | converter.convert(buffer.getCount(), buffer.begin(), utfBuffer); |
| 199 | bufferPtr = &utfBuffer; |
| 200 | } |
| 201 | |
| 202 | if (textType->getAttributes() & TEXTTYPE_ATTR_ACCENT_INSENSITIVE) |
| 203 | UnicodeUtil::utf8Normalize(*bufferPtr); |
| 204 | |
| 205 | return regex->matches((const char*) bufferPtr->begin(), bufferPtr->getCount()); |
| 206 | } |
| 207 | |
| 208 | private: |
| 209 | CsConvert converter; |
nothing calls this directly
no test coverage detected