MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / getVersions

Function getVersions

src/common/unicode_util.cpp:516–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514
515
516static void getVersions(const string& configInfo, ObjectsArray<string>& versions)
517{
518 charset cs;
519 IntlUtil::initAsciiCharset(&cs);
520
521 AutoPtr<CharSet> ascii(Jrd::CharSet::createInstance(*getDefaultMemoryPool(), 0, &cs));
522
523 IntlUtil::SpecificAttributesMap config;
524 IntlUtil::parseSpecificAttributes(ascii, configInfo.length(),
525 (const UCHAR*) configInfo.c_str(), &config);
526
527 string versionsStr;
528 if (config.get("icu_versions", versionsStr))
529 versionsStr.trim();
530 else
531 versionsStr = "default";
532
533 versions.clear();
534
535 FB_SIZE_T start = 0;
536 FB_SIZE_T n;
537
538 for (FB_SIZE_T i = versionsStr.find(' '); i != versionsStr.npos;
539 start = i + 1, i = versionsStr.find(' ', start))
540 {
541 if ((n = versionsStr.find_first_not_of(' ', start)) != versionsStr.npos)
542 start = n;
543 versions.add(versionsStr.substr(start, i - start));
544 }
545
546 if ((n = versionsStr.find_first_not_of(' ', start)) != versionsStr.npos)
547 start = n;
548 versions.add(versionsStr.substr(start));
549}
550
551
552// BOCU-1

Callers 1

loadICUMethod · 0.85

Calls 10

getDefaultMemoryPoolFunction · 0.85
lengthMethod · 0.45
c_strMethod · 0.45
getMethod · 0.45
trimMethod · 0.45
clearMethod · 0.45
findMethod · 0.45
find_first_not_ofMethod · 0.45
addMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected