From 460dc1c5ecfba0f0cef93026be5d25a4f86605b1 Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Tue, 10 Oct 2023 14:47:56 +0800 Subject: [PATCH] added "str_len" param in find_str_in_array --- inc/hgl/type/StrChar.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/inc/hgl/type/StrChar.h b/inc/hgl/type/StrChar.h index 2ab3e45..fafe40c 100644 --- a/inc/hgl/type/StrChar.h +++ b/inc/hgl/type/StrChar.h @@ -2466,10 +2466,21 @@ namespace hgl } template - const int find_str_in_array(int count,const T **str_array,const T *str) + const int find_str_in_array(int count,const T **str_array,const T *str,int str_len=0) { + if(str_len<=0) + str_len=hgl::strlen(str); + + int len; + for(int i=0;i