concordia-library/utf8case/special_casing_converter.cpp
Rafał Jaworski 6ddba32f48 utf8
Former-commit-id: fa7407621e839f87613476596c6589aeceb9d796
2014-04-24 11:51:04 +02:00

17 lines
443 B
C++

#include "special_casing_converter.hpp"
const char* SpecialCasingConverter::convert(uint32_t code_point) const {
for (size_t i = 0; i < tableSize_; ++i) {
const SpecialCasingConversionRecord* currentRecord = &conversionTable_[i];
if (code_point < currentRecord->code_point)
return 0;
if (code_point == currentRecord->code_point)
return currentRecord->replacement;
}
return 0;
}