From 4b6ea7212c16927f4e47008f78a7bf3ccfc94752 Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Mon, 6 Feb 2023 12:44:11 +0800 Subject: [PATCH] added AddUnique function at StringList class. --- inc/hgl/type/StringList.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/inc/hgl/type/StringList.h b/inc/hgl/type/StringList.h index d7b4ce6..ad0dc28 100644 --- a/inc/hgl/type/StringList.h +++ b/inc/hgl/type/StringList.h @@ -98,6 +98,27 @@ namespace hgl return(count); } + /** + * 增加一个字符串列表到当前字符串列表中,同时做去重复处理 + * @param sl 要增加的字符串列表 + */ + int AddUnique(const StringList &sl) ///<添加字符串 + { + const int count=sl.GetCount(); + + StringClass **str=sl.Items.GetData(); + + for(int i=0;i