mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2025-02-12 12:28:57 +00:00
vcard模块,修复字符串截取与拼接问题
Signed-off-by: liuxiyao223 <liuxiyao223@huawei.com>
This commit is contained in:
parent
513f3414bd
commit
bfb123969e
@ -332,9 +332,9 @@ std::string VCardUtils::TrimListToString(const std::vector<std::string> &strs)
|
||||
int32_t size = static_cast<int32_t>(strs.size());
|
||||
std::string result;
|
||||
if (size > 1) {
|
||||
std::string init = strs[VALUE_INDEX_ZERO];
|
||||
std::string init = "";
|
||||
result = std::accumulate(strs.begin(), strs.end(), init,
|
||||
[](std::string &str, const std::string &element) { return str + ";" + element; });
|
||||
[](std::string &str, const std::string &element) { return str + element + ";"; });
|
||||
} else if (size == 1) {
|
||||
return strs[0];
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user