注释修改

This commit is contained in:
2025-07-25 01:01:52 +08:00
parent 7139219855
commit 8d7ab8fa7e
5 changed files with 69 additions and 72 deletions

View File

@@ -95,7 +95,7 @@ namespace hgl
} }
/** /**
* 摄氏度到开 * 摄氏度到开尔文
*/ */
template<typename T> template<typename T>
inline T Celsius2Kelvin(const T &c) inline T Celsius2Kelvin(const T &c)
@@ -104,7 +104,7 @@ namespace hgl
} }
/** /**
* 开度到摄氏度 * 开尔文度到摄氏度
*/ */
template<typename T> template<typename T>
inline T Kelvin2Celsius(const T &k) inline T Kelvin2Celsius(const T &k)

View File

@@ -33,7 +33,7 @@ namespace hgl
return ArrayList<T *>::Insert(index,obj); return ArrayList<T *>::Insert(index,obj);
} }
virtual void Free() override ///<清除所有数据 virtual void Free() override ///<清除所有数据并释放缓冲区
{ {
Clear(); Clear();
ArrayList<T *>::Free(); ArrayList<T *>::Free();

View File

@@ -1,5 +1,4 @@
#ifndef HGL_STR_TEMPLATE_INCLUDE #pragma once
#define HGL_STR_TEMPLATE_INCLUDE
#include<hgl/TypeFunc.h> #include<hgl/TypeFunc.h>
namespace hgl namespace hgl
@@ -2729,7 +2728,6 @@ namespace hgl
if(pna->ToNumber(sp,result)) if(pna->ToNumber(sp,result))
{ {
++count; ++count;
result_list.Add(result); result_list.Add(result);
++p; ++p;
@@ -3004,7 +3002,7 @@ namespace hgl
} }
/** /**
* 将一串原始数据转成16进制数值字符串 * 将一串原始数据转成16进制数值字符串
* @param str 16进制数值字符串存入处 * @param str 16进制数值字符串存入处
* @param src 原始的数据 * @param src 原始的数据
* @param size 原始数据字节长度 * @param size 原始数据字节长度
@@ -3057,4 +3055,3 @@ namespace hgl
template<typename T> inline void ToUpperHexStr(T *str,const void *data,const int size,const T gap_char=0){DataToHexStr<T>(str,(const uint8 *)data,size,UpperHexChar,gap_char);} template<typename T> inline void ToUpperHexStr(T *str,const void *data,const int size,const T gap_char=0){DataToHexStr<T>(str,(const uint8 *)data,size,UpperHexChar,gap_char);}
template<typename T> inline void ToLowerHexStr(T *str,const void *data,const int size,const T gap_char=0){DataToHexStr<T>(str,(const uint8 *)data,size,LowerHexChar,gap_char);} template<typename T> inline void ToLowerHexStr(T *str,const void *data,const int size,const T gap_char=0){DataToHexStr<T>(str,(const uint8 *)data,size,LowerHexChar,gap_char);}
}//namespace hgl }//namespace hgl
#endif//HGL_STR_TEMPLATE_INCLUDE

View File

@@ -507,9 +507,9 @@ namespace hgl
/** /**
* 和一个字符串进行比较 * 和一个字符串进行比较
* @param bs 比较字符串 * @param bs 比较字符串
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int Comp(const SelfClass &bs)const int Comp(const SelfClass &bs)const
{ {
@@ -525,9 +525,9 @@ namespace hgl
/** /**
* 和一个字符串进行比较 * 和一个字符串进行比较
* @param str 比较字符串 * @param str 比较字符串
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int Comp(const T *str)const int Comp(const T *str)const
{ {
@@ -546,9 +546,9 @@ namespace hgl
* 和一个字符串进行比较 * 和一个字符串进行比较
* @param pos 起始位置 * @param pos 起始位置
* @param bs 比较字符串 * @param bs 比较字符串
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int Comp(const uint pos,const SelfClass &bs)const int Comp(const uint pos,const SelfClass &bs)const
{ {
@@ -566,9 +566,9 @@ namespace hgl
* @param pos 起始位置 * @param pos 起始位置
* @param bs 比较字符串 * @param bs 比较字符串
* @param num 比较长度 * @param num 比较长度
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int Comp(const uint pos,const SelfClass &bs,const int num)const int Comp(const uint pos,const SelfClass &bs,const int num)const
{ {
@@ -585,9 +585,9 @@ namespace hgl
* 和一个字符串进行比较 * 和一个字符串进行比较
* @param pos 起始位置 * @param pos 起始位置
* @param str 比较字符串 * @param str 比较字符串
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int Comp(const uint pos,const T *str)const int Comp(const uint pos,const T *str)const
{ {
@@ -607,9 +607,9 @@ namespace hgl
* @param pos 起始位置 * @param pos 起始位置
* @param str 比较字符串 * @param str 比较字符串
* @param num 比较长度 * @param num 比较长度
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int Comp(const uint pos,const T *str,const int num)const int Comp(const uint pos,const T *str,const int num)const
{ {
@@ -625,11 +625,11 @@ namespace hgl
} }
/** /**
* 和一个字符串进行比较,英文不区分大小写 * 和一个字符串进行比较,英文不区分大小写
* @param bs 比较字符串 * @param bs 比较字符串
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int CaseComp(const SelfClass &bs)const int CaseComp(const SelfClass &bs)const
{ {
@@ -645,11 +645,11 @@ namespace hgl
} }
/** /**
* 和一个字符串进行比较,英文不区分大小写 * 和一个字符串进行比较,英文不区分大小写
* @param str 比较字符串 * @param str 比较字符串
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int CaseComp(const T *str)const int CaseComp(const T *str)const
{ {
@@ -665,12 +665,12 @@ namespace hgl
} }
/** /**
* 和一个字符串比较指长度的字符 * 和一个字符串比较指长度的字符
* @param bs 比较字符串 * @param bs 比较字符串
* @param num 比较字数 * @param num 比较字
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int Comp(const SelfClass &bs,const int num)const int Comp(const SelfClass &bs,const int num)const
{ {
@@ -688,12 +688,12 @@ namespace hgl
} }
/** /**
* 和一个字符串比较指长度的字符 * 和一个字符串比较指长度的字符
* @param str 比较字符串 * @param str 比较字符串
* @param num 比较字数 * @param num 比较字
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int Comp(const T *str,const int num)const int Comp(const T *str,const int num)const
{ {
@@ -709,12 +709,12 @@ namespace hgl
} }
/** /**
* 和一个字符串比较指长度的字符,英文不区分大小写 * 和一个字符串比较指长度的字符,英文不区分大小写
* @param bs 比较字符串 * @param bs 比较字符串
* @param num 比较字数 * @param num 比较字
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int CaseComp(const SelfClass &bs,const int num)const int CaseComp(const SelfClass &bs,const int num)const
{ {
@@ -725,19 +725,19 @@ namespace hgl
return bs.Length(); return bs.Length();
} }
if(bs.Length<=0) if(bs.Length()<=0)
return 1; return 1;
return data->CaseComp(bs.data->c_str(),num); return data->CaseComp(bs.data->c_str(),num);
} }
/** /**
* 和一个字符串比较指长度的字符,英文不区分大小写 * 和一个字符串比较指长度的字符,英文不区分大小写
* @param str 比较字符串 * @param str 比较字符串
* @param num 比较字数 * @param num 比较字
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int CaseComp(const T *str,const int num)const int CaseComp(const T *str,const int num)const
{ {
@@ -753,12 +753,12 @@ namespace hgl
} }
/** /**
* 和一个字符串比较指长度的字符,英文不区分大小写 * 和一个字符串比较指长度的字符,英文不区分大小写
* @param str 比较字符串 * @param str 比较字符串
* @param num 比较字数 * @param num 比较字
* @return <0 自身小 * @return <0 此字符串小于参数字符串
* @return 0 等 * @return 0
* @return >0 自身大 * @return >0 此字符串大于参数字符串
*/ */
int CaseComp(const uint pos,const T *str,const int num)const int CaseComp(const uint pos,const T *str,const int num)const
{ {
@@ -932,7 +932,7 @@ namespace hgl
* @param sc 新的字符串 * @param sc 新的字符串
* @param start 起始字符索引 * @param start 起始字符索引
* @param n 字符数量 * @param n 字符数量
* @return 否成功 * @return 否成功
*/ */
bool SubString(SelfClass &sc,int start,int n) const ///<取字符串指定段的字符 bool SubString(SelfClass &sc,int start,int n) const ///<取字符串指定段的字符
{ {

View File

@@ -192,11 +192,11 @@ namespace hgl
} }
/** /**
* 查找字符串,英文无视大小写 * 查找字符串,英文不区分大小写
* @param str 要找的字符串 * @param str 要找的字符串
* @return 查找到的字符串的索引,未找到返回-1 * @return 查找到的字符串的索引,未找到返回-1
*/ */
int CaseFind(const StringClass &str) const ///<查找字符串,英文无视大小写,未找到返回-1 int CaseFind(const StringClass &str) const ///<查找字符串,英文不区分大小写,未找到返回-1
{ {
const int count=Items.GetCount(); const int count=Items.GetCount();
StringClass** sl = Items.GetData(); StringClass** sl = Items.GetData();
@@ -211,17 +211,17 @@ namespace hgl
} }
/** /**
* 确认字符串在,英文区分大小写 * 确认字符串在,英文区分大小写
*/ */
bool Exist(const StringClass &str) const ///<确认字符串在,英文区分大小写 bool Exist(const StringClass &str) const ///<确认字符串在,英文区分大小写
{ {
return Find(str)!=-1; return Find(str)!=-1;
} }
/** /**
* 确认字符串在,英文无视大小写 * 确认字符串在,英文不区分大小写
*/ */
bool CaseExist(const StringClass &str) const ///<确认字符串在,英文无视大小写 bool CaseExist(const StringClass &str) const ///<确认字符串在,英文不区分大小写
{ {
return CaseFind(str)!=-1; return CaseFind(str)!=-1;
} }
@@ -248,12 +248,12 @@ namespace hgl
} }
/** /**
* 查找字符串,英文无视大小写,并指定最大比较长度 * 查找字符串,英文不区分大小写,并指定最大比较长度
* @param str 要找的字符串 * @param str 要找的字符串
* @param cn 限定的要查找字符串的最大长度 * @param cn 限定的要查找字符串的最大长度
* @return 查找到的字符串的索引,未找到返回-1 * @return 查找到的字符串的索引,未找到返回-1
*/ */
int CaseFind(const StringClass &str,const int cn) const ///<查找字符串,英文无视大小写,未找到返回-1 int CaseFind(const StringClass &str,const int cn) const ///<查找字符串,英文不区分大小写,未找到返回-1
{ {
const int count=Items.GetCount(); const int count=Items.GetCount();