add Comp(start,string,comp_len) function of BaseString

This commit is contained in:
hyzboy 2020-01-13 11:17:24 +08:00
parent cdc2805477
commit 43e8db0b61

View File

@ -478,6 +478,27 @@ namespace hgl
/**
*
* @param pos
* @param bs
* @param num
* @return <0
* @return 0
* @return >0
*/
int Comp(const int pos,const SelfClass &bs,const int num)const
{
if(!data.valid())
return(bs.Length());
if(bs.Length()<=0)
return Length();
return data->Comp(pos,bs.data.get(),num);
}
/**
*
* @param pos
* @param str
* @return <0
* @return 0
@ -496,6 +517,28 @@ namespace hgl
return data->Comp(pos,str);
}
/**
*
* @param pos
* @param str
* @param num
* @return <0
* @return 0
* @return >0
*/
int Comp(const int pos,const T *str,const int num)const
{
if(!data.valid())
{
if(!str)
return 0;
else
return *str;
}
return data->Comp(pos,str,num);
}
/**
* ,
* @param bs