1 #include "codecutils.h"
4 namespace StringCodec {
6 int transform_mapping_or_direct(const int *mapping, unsigned map_size, int ch, bool reverse)
8 for(unsigned i=0; i<map_size*2; i+=2)
10 if(mapping[i+reverse]==ch)
11 return mapping[i+1-reverse];
12 else if(mapping[i+1-reverse]==ch)
19 } // namespace StringCodec