MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / NewFromString

Method NewFromString

src/Config.cpp:845–856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

843}
844
845ConverterPtr Config::NewFromString(const std::string& json,
846 const std::string& configDirectory) {
847 std::vector<std::string> paths;
848 if (!configDirectory.empty()) {
849 if (configDirectory.back() == '/' || configDirectory.back() == '\\') {
850 paths.push_back(configDirectory);
851 } else {
852 paths.push_back(configDirectory + '/');
853 }
854 }
855 return NewFromString(json, paths);
856}
857
858ConverterPtr Config::NewFromString(const std::string& json,
859 const std::vector<std::string>& paths) {

Callers 2

TEST_FFunction · 0.80
OpenccBindingMethod · 0.80

Calls 14

moveFunction · 0.85
GetStringMethod · 0.80
HasMemberMethod · 0.80
ParseSegmentationMethod · 0.80
ParseConversionChainMethod · 0.80
ConfigLoadOptionsFunction · 0.70
emptyMethod · 0.45
push_backMethod · 0.45
HasParseErrorMethod · 0.45

Tested by 1

TEST_FFunction · 0.64