Ignore:
Timestamp:
Dec 9, 2017, 4:37:51 PM (19 months ago)
Author:
cameron
Message:

Restructure to eliminate unnecessary dependencies on RegExpCompiler? and UCDLIB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/CaseFolding.cpp

    r5748 r5770  
    77
    88#include "CaseFolding.h"
     9#include <UCD/unicode_set.h>
    910#include <algorithm>
    1011
     
    7374    }
    7475}
     76inline codepoint_t lo_codepoint(const interval_t & i) {
     77    return std::get<0>(i);
     78}
     79
     80inline codepoint_t hi_codepoint(const interval_t & i) {
     81    return std::get<1>(i);
     82}
     83
     84UnicodeSet * caseInsensitize(UnicodeSet * const cc) {
     85    UnicodeSet * cci = new UnicodeSet();
     86    for (const interval_t i : *cc) {
     87        caseInsensitiveInsertRange(cci, lo_codepoint(i), hi_codepoint(i));
     88    }
     89    return cci;
     90}
    7591
    7692
Note: See TracChangeset for help on using the changeset viewer.