MCPcopy Create free account
hub / github.com/catboost/catboost / TCodePageHash

Method TCodePageHash

library/cpp/charset/codepage.cpp:161–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159
160public:
161 inline TCodePageHash()
162 : Pool(20 * 1024) /* Currently used: 17KB. */
163 {
164 TString xPrefix = "x-";
165 const char* name;
166
167 for (size_t i = 0; i != CODES_MAX; ++i) {
168 ECharset e = static_cast<ECharset>(i);
169 const CodePage* page = Singleton<NCodepagePrivate::TCodepagesMap>()->GetPrivate(e);
170
171 AddName(ToString(static_cast<int>(i)), e);
172
173 for (size_t j = 0; (name = page->Names[j]) != nullptr && name[0]; ++j) {
174 AddName(name, e);
175
176 AddName(xPrefix + name, e);
177 }
178 }
179 }
180
181 inline ECharset CharsetByName(TStringBuf name) {
182 if (!name)

Callers

nothing calls this directly

Calls 2

GetPrivateMethod · 0.80
ToStringFunction · 0.50

Tested by

no test coverage detected