Files
open-im-sdk-flutter-m/windows/src/FLTConvert.cpp
2025-04-30 17:36:24 +08:00

47 lines
1.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.
#include "FLTConvert.h"
Convert::Convert() {}
std::string Convert::getStringFormMapForLog(
const flutter::EncodableMap* arguments) const {
if (!arguments) {
return "";
}
// todo
return "";
}
void Convert::getLogList(const std::string& strLog,
std::list<std::string>& listLog) const {
listLog.clear();
int num = 15 * 1024; // 分割定长大小
int len = strLog.length(); // 字符串长度
int end = num;
for (int start = 0; start < len;) {
if (end > len) // 针对最后一个分割串
{
listLog.emplace_back(
strLog.substr(start, len - start)); // 最后一个字符串的原始部分
break;
}
listLog.emplace_back(
strLog.substr(start, num)); // 从0开始分割num位字符串
start = end;
end = end + num;
}
}
std::string Convert::getStringFormListForLog(
const flutter::EncodableList* arguments) const {
if (!arguments) {
return "";
}
return "";
}