43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
![]() |
#pragma once
|
||
|
|
||
|
namespace xtr::index {
|
||
|
|
||
|
static constexpr auto UNICODE_SUB_0 = 0x2080;
|
||
|
static constexpr auto UNICODE_SUB_1 = 0x2081;
|
||
|
static constexpr auto UNICODE_SUB_2 = 0x2082;
|
||
|
static constexpr auto UNICODE_SUB_3 = 0x2083;
|
||
|
static constexpr auto UNICODE_SUB_4 = 0x2084;
|
||
|
static constexpr auto UNICODE_SUB_5 = 0x2085;
|
||
|
static constexpr auto UNICODE_SUB_6 = 0x2086;
|
||
|
static constexpr auto UNICODE_SUB_7 = 0x2087;
|
||
|
static constexpr auto UNICODE_SUB_8 = 0x2088;
|
||
|
static constexpr auto UNICODE_SUB_9 = 0x2089;
|
||
|
|
||
|
//! Indecies formatting options enumeration
|
||
|
enum class Digits : uint32_t {
|
||
|
plainText = 1,
|
||
|
subText
|
||
|
};
|
||
|
|
||
|
//! Indexing symbol options
|
||
|
struct IndexingParams {
|
||
|
Digits global{ Digits::plainText };
|
||
|
Digits local{ Digits::plainText };
|
||
|
Digits operators{ Digits::subText };
|
||
|
};
|
||
|
|
||
|
inline void FixLegacy(CString& input) {
|
||
|
input.Replace(UNICODE_SUB_0, '0');
|
||
|
input.Replace(UNICODE_SUB_1, '1');
|
||
|
input.Replace(UNICODE_SUB_2, '2');
|
||
|
input.Replace(UNICODE_SUB_3, '3');
|
||
|
input.Replace(UNICODE_SUB_4, '4');
|
||
|
input.Replace(UNICODE_SUB_5, '5');
|
||
|
input.Replace(UNICODE_SUB_6, '6');
|
||
|
input.Replace(UNICODE_SUB_7, '7');
|
||
|
input.Replace(UNICODE_SUB_8, '8');
|
||
|
input.Replace(UNICODE_SUB_9, '9');
|
||
|
}
|
||
|
|
||
|
} // namespace xtr::index
|