Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/server.cpp
Show All 12 Lines | |||||
#include "random.h" | #include "random.h" | ||||
#include "sync.h" | #include "sync.h" | ||||
#include "ui_interface.h" | #include "ui_interface.h" | ||||
#include "util.h" | #include "util.h" | ||||
#include "utilstrencodings.h" | #include "utilstrencodings.h" | ||||
#include <univalue.h> | #include <univalue.h> | ||||
#include <boost/algorithm/string/case_conv.hpp> // for to_upper() | |||||
#include <boost/algorithm/string/classification.hpp> | #include <boost/algorithm/string/classification.hpp> | ||||
#include <boost/algorithm/string/split.hpp> | #include <boost/algorithm/string/split.hpp> | ||||
#include <boost/bind.hpp> | #include <boost/bind.hpp> | ||||
#include <boost/signals2/signal.hpp> | #include <boost/signals2/signal.hpp> | ||||
#include <memory> // for unique_ptr | #include <memory> // for unique_ptr | ||||
#include <set> | #include <set> | ||||
#include <unordered_map> | #include <unordered_map> | ||||
▲ Show 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | for (const std::pair<std::string, const ContextFreeRPCCommand *> &command : | ||||
strHelp = strHelp.substr(0, strHelp.find('\n')); | strHelp = strHelp.substr(0, strHelp.find('\n')); | ||||
} | } | ||||
if (category != pcmd->category) { | if (category != pcmd->category) { | ||||
if (!category.empty()) { | if (!category.empty()) { | ||||
strRet += "\n"; | strRet += "\n"; | ||||
} | } | ||||
category = pcmd->category; | category = pcmd->category; | ||||
std::string firstLetter = category.substr(0, 1); | strRet += "== " + Capitalize(category) + " ==\n"; | ||||
boost::to_upper(firstLetter); | |||||
strRet += | |||||
"== " + firstLetter + category.substr(1) + " ==\n"; | |||||
} | } | ||||
} | } | ||||
strRet += strHelp + "\n"; | strRet += strHelp + "\n"; | ||||
} | } | ||||
} | } | ||||
if (strRet == "") { | if (strRet == "") { | ||||
strRet = strprintf("help: unknown command: %s\n", strCommand); | strRet = strprintf("help: unknown command: %s\n", strCommand); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 330 Lines • Show Last 20 Lines |