Lines Matching defs:string

24 thread_local std::map<std::string, int64_t> Console::timerMap;
25 thread_local std::map<std::string, uint32_t> Console::counterMap;
26 thread_local std::string Console::groupIndent;
32 std::map<std::string, std::string> tableChars = {
71 std::string Console::ParseLogContent(const std::vector<std::string>& params)
73 std::string ret;
77 std::string formatStr = params[0];
124 std::string Console::MakeLogContent(napi_env env, napi_callback_info info, size_t& argc, size_t startIdx, bool format)
126 std::vector<std::string> content;
138 HILOG_ERROR("Console log failed to convert to string object");
143 std::string stringValue = Helper::NapiHelper::GetPrintString(env, argv[i]);
152 std::string ret;
162 std::string Console::StringRepeat(size_t number, const std::string& tableChars)
164 std::string divider;
180 std::string content;
187 std::string Console::GetTimerOrCounterName(napi_env env, napi_callback_info info, size_t argc)
200 "the type of Timer or Counter name must be string.");
205 std::string name = Helper::NapiHelper::GetPrintString(env, argv[0]);
217 std::string counterName = GetTimerOrCounterName(env, info, argc);
227 std::string counterName = GetTimerOrCounterName(env, info, argc);
247 std::string ctorVal = Helper::NapiHelper::GetConstructorName(env, argv[0]);
261 std::string content = Helper::NapiHelper::GetPrintString(env, transValue);
292 std::string Console::ArrayJoin(std::vector<std::string> rowDivider, const std::string& tableChars)
298 std::string result = rowDivider[0];
306 std::string Console::RenderHead(napi_env env, napi_value head, std::vector<size_t> columnWidths)
308 std::string result = tableChars["left"];
313 napi_value string = nullptr;
314 napi_status status = napi_coerce_to_string(env, element, &string);
317 "Table elements can't convert to string.");
320 std::string elemStr = Helper::NapiHelper::GetPrintString(env, string);
333 std::string Console::GetStringAndStringWidth(napi_env env, napi_value element, size_t& stringLen)
335 napi_value string = nullptr;
336 napi_status status = napi_coerce_to_string(env, element, &string);
339 "GetStringAndStringWidth: can't convert to string.");
342 std::string result = Helper::NapiHelper::GetPrintString(env, string);
355 std::string result = tableChars["left"];
360 std::string stringVal = GetStringAndStringWidth(env, element, stringLen);
382 std::vector<std::string> rowDivider(columnLen);
384 // get key string length
392 // compare key/value string and get max length
404 std::string indexRow1 = tableChars["topLeft"] +
407 std::string indexRow2 = RenderHead(env, head, columnWidths);
408 std::string indexRow3 = tableChars["leftMiddle"] +
417 std::string endRow = tableChars["bottomLeft"] +
506 void ProcessNestedObject(napi_env env, napi_value item, napi_value& map, std::map<std::string, bool>& initialMap,
524 if (initialMap.find(std::string(innerKey)) == initialMap.end()) {
562 std::map<std::string, bool> initialMap;
617 void Console::PrintTime(std::string timerName, double time, const std::string& log)
657 std::string timerName = GetTimerOrCounterName(env, info, argc);
670 std::string timerName = GetTimerOrCounterName(env, info, argc);
676 std::string content = MakeLogContent(env, info, argc, 1, false); // startInx = 1, format = false;
688 std::string timerName = GetTimerOrCounterName(env, info, argc);
706 std::string content;
711 std::string stack;
713 std::string tempStr = "";
727 std::string stack;
730 std::string tempStr = "";
757 std::string content = "Assertion failed";