From 7927586bd1e36f0e0d7dd6d1e944570bd5121e19 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 3 Sep 2020 15:52:46 +0800 Subject: [PATCH] rename from BaseString to String --- inc/hgl/CodePage.h | 2 +- inc/hgl/filesystem/FileSystem.h | 30 +++--- inc/hgl/io/DataInputStream.h | 2 +- inc/hgl/io/DataOutputStream.h | 8 +- inc/hgl/io/FileAccess.h | 2 +- inc/hgl/io/TextOutputStream.h | 4 +- inc/hgl/log/Logger.h | 2 +- inc/hgl/plugin/PlugIn.h | 2 +- inc/hgl/thread/Thread.h | 2 +- inc/hgl/type/StdString.h | 2 +- inc/hgl/type/{BaseString.h => String.h} | 116 ++++++++++++------------ inc/hgl/type/StringList.h | 64 ++++++------- src/CMakeLists.txt | 2 +- 13 files changed, 119 insertions(+), 119 deletions(-) rename inc/hgl/type/{BaseString.h => String.h} (90%) diff --git a/inc/hgl/CodePage.h b/inc/hgl/CodePage.h index c81b080..7eb0c3d 100644 --- a/inc/hgl/CodePage.h +++ b/inc/hgl/CodePage.h @@ -2,7 +2,7 @@ #define HGL_CODE_PAGE_INCLUDE #include -#include +#include namespace hgl { struct CodePageAndCharSet diff --git a/inc/hgl/filesystem/FileSystem.h b/inc/hgl/filesystem/FileSystem.h index 5d1ce76..88bb551 100644 --- a/inc/hgl/filesystem/FileSystem.h +++ b/inc/hgl/filesystem/FileSystem.h @@ -1,7 +1,7 @@ #ifndef HGL_FILE_SYSTEM_INCLUDE #define HGL_FILE_SYSTEM_INCLUDE -#include +#include #include namespace hgl { @@ -13,9 +13,9 @@ namespace hgl namespace filesystem { template - inline BaseString MergeFilename(const BaseString &pathname,const BaseString &filename,const T directory_separator_char,const T *directory_separator_str) + inline String MergeFilename(const String &pathname,const String &filename,const T directory_separator_char,const T *directory_separator_str) { - BaseString fullname; + String fullname; if(pathname.GetEndChar()==directory_separator_char) //结尾有分隔符 { @@ -47,17 +47,17 @@ namespace hgl * @param fullname 完整路径文件名 */ template - inline BaseString ClipFilename(const BaseString &fullname) + inline String ClipFilename(const String &fullname) { if(fullname.Length()<=1) - return(BaseString()); + return(String()); const T spear_char[] = { '/','\\' }; const int pos=fullname.FindRightChar(spear_char); if(pos==-1) - return BaseString(fullname); + return String(fullname); return fullname.SubString(pos+1); } @@ -68,15 +68,15 @@ namespace hgl * @param split_char 扩展名分隔符,一般为'.' */ template - inline BaseString ClipFileMainname(const BaseString &filename,const T split_char='.') + inline String ClipFileMainname(const String &filename,const T split_char='.') { if(filename.Length()<=1) - return(BaseString()); + return(String()); const int pos=filename.FindRightChar(split_char); if(pos==-1) - return BaseString(filename); + return String(filename); return filename.SubString(0,pos); } @@ -87,7 +87,7 @@ namespace hgl * @param include_dot 是否包括点 */ template - inline BaseString ClipFileExtName(const BaseString &fullname,bool include_dot=true) + inline String ClipFileExtName(const String &fullname,bool include_dot=true) { int end=fullname.FindChar(T('?')); //url的文件名,以?为结束 @@ -97,7 +97,7 @@ namespace hgl int pos=fullname.FindRightChar(fullname.Length()-end,T('.')); if(pos==-1) - return BaseString(); + return String(); return include_dot? fullname.SubString(pos, end- pos ): fullname.SubString(pos+1, end-(pos+1)); @@ -107,10 +107,10 @@ namespace hgl * 截取路径最后一个名字 */ template - inline BaseString ClipLastPathname(const BaseString &fullname) + inline String ClipLastPathname(const String &fullname) { if(fullname.Length()<=1) - return(BaseString()); + return(String()); const T gap_char[2]={'\\','/'}; @@ -136,14 +136,14 @@ namespace hgl { if(*e==gap_char[0]||*e==gap_char[1]) { - return BaseString(e+1,p-e); + return String(e+1,p-e); } --e; } } - return(BaseString()); + return(String()); } inline UTF8String MergeFilename(const UTF8String &pathname,const UTF8String &filename) ///<组合路径名与文件名 diff --git a/inc/hgl/io/DataInputStream.h b/inc/hgl/io/DataInputStream.h index 07843aa..b190c44 100644 --- a/inc/hgl/io/DataInputStream.h +++ b/inc/hgl/io/DataInputStream.h @@ -2,7 +2,7 @@ #define HGL_IO_DATA_INPUT_STREAM_INCLUDE #include -#include +#include #include namespace hgl { diff --git a/inc/hgl/io/DataOutputStream.h b/inc/hgl/io/DataOutputStream.h index 0f2c292..6a3dd66 100644 --- a/inc/hgl/io/DataOutputStream.h +++ b/inc/hgl/io/DataOutputStream.h @@ -2,7 +2,7 @@ #define HGL_IO_DATA_OUTPUT_STREAM_INCLUDE #include -#include +#include #include #include namespace hgl @@ -136,9 +136,9 @@ namespace hgl template bool WriteUTF16LEChars (const T *str,uint count); ///<按utf16-le格式写入字符阵列 template bool WriteUTF16BEChars (const T *str,uint count); ///<按utf16-be格式写入字符阵列 - template bool WriteUTF8Chars (const BaseString &str){return WriteUTF8Chars (str.c_str(),str.Length());} - template bool WriteUTF16LEChars (const BaseString &str){return WriteUTF16LEChars (str.c_str(),str.Length());} - template bool WriteUTF16BEChars (const BaseString &str){return WriteUTF16BEChars (str.c_str(),str.Length());} + template bool WriteUTF8Chars (const String &str){return WriteUTF8Chars (str.c_str(),str.Length());} + template bool WriteUTF16LEChars (const String &str){return WriteUTF16LEChars (str.c_str(),str.Length());} + template bool WriteUTF16BEChars (const String &str){return WriteUTF16BEChars (str.c_str(),str.Length());} template bool WriteUTF8StringWithLength (const u8char *str,const uint length); template bool WriteUTF8StringWithLength (const UTF16String &str); diff --git a/inc/hgl/io/FileAccess.h b/inc/hgl/io/FileAccess.h index 0b9aed3..903ecc9 100644 --- a/inc/hgl/io/FileAccess.h +++ b/inc/hgl/io/FileAccess.h @@ -1,7 +1,7 @@ #ifndef HGL_IO_FILE_ACCESS_INCLUDE #define HGL_IO_FILE_ACCESS_INCLUDE -#include +#include #include #include namespace hgl diff --git a/inc/hgl/io/TextOutputStream.h b/inc/hgl/io/TextOutputStream.h index e3f502c..4b4e6c0 100644 --- a/inc/hgl/io/TextOutputStream.h +++ b/inc/hgl/io/TextOutputStream.h @@ -59,7 +59,7 @@ namespace hgl virtual bool WriteChars(const u16char *,int64)=0; ///<写入一个字符串 template - bool WriteString(const BaseString &str) ///<写入一个字符串 + bool WriteString(const String &str) ///<写入一个字符串 { return WriteChars(str.c_str(),str.Length()); } @@ -79,7 +79,7 @@ namespace hgl } template - bool WriteLine(const BaseString &str) + bool WriteLine(const String &str) { return WriteLine(str.c_str(),str.Length()); } diff --git a/inc/hgl/log/Logger.h b/inc/hgl/log/Logger.h index 8c62696..9294480 100644 --- a/inc/hgl/log/Logger.h +++ b/inc/hgl/log/Logger.h @@ -1,7 +1,7 @@ #ifndef HGL_LOGGER_INCLUDE #define HGL_LOGGER_INCLUDE -#include +#include namespace hgl { namespace logger diff --git a/inc/hgl/plugin/PlugIn.h b/inc/hgl/plugin/PlugIn.h index 3ff1008..0fbe1a2 100644 --- a/inc/hgl/plugin/PlugIn.h +++ b/inc/hgl/plugin/PlugIn.h @@ -1,7 +1,7 @@ #ifndef HGL_PLUGIN_INCLUDE #define HGL_PLUGIN_INCLUDE -#include +#include namespace hgl { /** diff --git a/inc/hgl/thread/Thread.h b/inc/hgl/thread/Thread.h index f9a617a..eeae8a8 100644 --- a/inc/hgl/thread/Thread.h +++ b/inc/hgl/thread/Thread.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/inc/hgl/type/StdString.h b/inc/hgl/type/StdString.h index 167a458..b72fd84 100644 --- a/inc/hgl/type/StdString.h +++ b/inc/hgl/type/StdString.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #if HGL_OS == HGL_OS_Windows diff --git a/inc/hgl/type/BaseString.h b/inc/hgl/type/String.h similarity index 90% rename from inc/hgl/type/BaseString.h rename to inc/hgl/type/String.h index 7887954..e8cda26 100644 --- a/inc/hgl/type/BaseString.h +++ b/inc/hgl/type/String.h @@ -9,13 +9,13 @@ namespace hgl { /** - * 字符串基类 + * 字符串类 */ - template class BaseString ///字符串基类 + template class String ///字符串基类 { protected: - using SelfClass =BaseString; + using SelfClass =String; using InstClass =StringInstance; using SharedClass =SharedPtr; @@ -23,9 +23,9 @@ namespace hgl public: - BaseString()=default; + String()=default; - BaseString(InstClass *ic) + String(InstClass *ic) { data=ic; } @@ -34,7 +34,7 @@ namespace hgl * 根据一个C指针风格字符串设置当前字符串内容 * @param str 字符串内容,需以0为结尾 */ - BaseString(const T *str) + String(const T *str) { SetString(str); } @@ -44,21 +44,21 @@ namespace hgl * @param str 字符串内容,在len<0的情况下,需以0为结尾 * @param len 字符串长度,如果str以0为结尾,可以为负值,将启用自动计算长度 */ - BaseString(const T *str,int len) + String(const T *str,int len) { SetString(str,len); } - static BaseString newOf(T *str,const uint len) + static String newOf(T *str,const uint len) { StringInstance *si=new StringInstance(); si->InitFromInstance(str,len); - return BaseString(si); + return String(si); } - BaseString(io::InputStream *is,int len=0) + String(io::InputStream *is,int len=0) { if(len<=0) len=is->Available(); @@ -76,26 +76,26 @@ namespace hgl SetInstance(str,len); } - BaseString(const char)=delete; + String(const char)=delete; - static BaseString charOf(const T &ch) + static String charOf(const T &ch) { T *str=new T[2]; str[0]=ch; str[1]=0; - return BaseString::newOf(str,1); + return String::newOf(str,1); } - BaseString(const InstClass &si) + String(const InstClass &si) { if((&si)==nullptr)return; data=si; } - BaseString(const SelfClass &bs) + String(const SelfClass &bs) { if((&bs)==nullptr)return; @@ -103,8 +103,8 @@ namespace hgl } #define BASE_STRING_NUMBER_CONSTRUCT(type,func) \ - BaseString(const type num)=delete; \ - static BaseString valueOf(const type value) \ + String(const type num)=delete; \ + static String valueOf(const type value) \ { \ StringInstance *si=new StringInstance(); \ \ @@ -115,7 +115,7 @@ namespace hgl func(tmp_str,len,value); \ si->InitFromInstance(tmp_str,hgl::strlen(tmp_str)); \ \ - return BaseString(si); \ + return String(si); \ } BASE_STRING_NUMBER_CONSTRUCT(int, itos); @@ -128,9 +128,9 @@ namespace hgl #undef BASE_STRING_NUMBER_CONSTRUCT - BaseString(const int *value,int N)=delete; + String(const int *value,int N)=delete; - static BaseString valueOf(const int *value,int N) + static String valueOf(const int *value,int N) { const int size=N*sizeof(int)*8; int len; @@ -148,12 +148,12 @@ namespace hgl ++value; } - return BaseString(tmp_str); + return String(tmp_str); } - BaseString(const float *value,int N)=delete; + String(const float *value,int N)=delete; - static BaseString valueOf(const float *value,int N) + static String valueOf(const float *value,int N) { const int size=N*sizeof(float)*16; int len; @@ -171,10 +171,10 @@ namespace hgl ++value; } - return BaseString(tmp_str); + return String(tmp_str); } - virtual ~BaseString()=default; + virtual ~String()=default; const T GetBeginChar()const ///<取得当前字符串第一个字符 { @@ -352,7 +352,7 @@ namespace hgl } /** - * 断开与其它BaseString共用的情况,创建一个独有的实例 + * 断开与其它String共用的情况,创建一个独有的实例 */ bool Unlink() { @@ -971,7 +971,7 @@ namespace hgl * @param pos 起始查找位置 * @param ch 要查找的字符,可以是多个,找到任意一个就算 */ - int FindChar(uint pos,const BaseString &ch)const ///<返回当前字符串中指定字符(多个任选一)的索引(从左至右) + int FindChar(uint pos,const String &ch)const ///<返回当前字符串中指定字符(多个任选一)的索引(从左至右) { if(!data.valid()) return(-1); @@ -984,7 +984,7 @@ namespace hgl return(-1); } - int FindChar(const BaseString &ch)const{return FindChar(0,ch);} ///<返回当前字符串中指定字符(多个任选一)的索引(从左至右) + int FindChar(const String &ch)const{return FindChar(0,ch);} ///<返回当前字符串中指定字符(多个任选一)的索引(从左至右) int FindRightChar(const T ch)const ///<返回当前字符串中指定字符开始的索引(从右至左) { @@ -999,7 +999,7 @@ namespace hgl return(-1); } - int FindRightChar(const BaseString &ch)const ///<返回当前字符串中指定字符(多个任选一)开始的索引(从右至左) + int FindRightChar(const String &ch)const ///<返回当前字符串中指定字符(多个任选一)开始的索引(从右至左) { if(!data.valid()) return(-1); @@ -1035,7 +1035,7 @@ namespace hgl * @param off 从右至左跳过不查的字符个数 * @param ch 要查找的字符 */ - int FindRightChar(const int off,const BaseString &ch)const + int FindRightChar(const int off,const String &ch)const { if(!data.valid()) return(-1); @@ -1073,7 +1073,7 @@ namespace hgl * @param pos 起始查找位置 * @param ch 要排除的字符 */ - int FindExcludeChar(const uint pos,const BaseString &ch)const + int FindExcludeChar(const uint pos,const String &ch)const { if(!data.valid()) return(-1); @@ -1086,7 +1086,7 @@ namespace hgl return(-1); } - int FindExcludeChar(const BaseString &ch)const{return FindExcludeChar(0,ch);} + int FindExcludeChar(const String &ch)const{return FindExcludeChar(0,ch);} /** * 在整个字符串内,查找指定字符串 @@ -1228,7 +1228,7 @@ namespace hgl ms[new_len]=0; - return BaseString::newOf(ms,new_len); + return String::newOf(ms,new_len); } SelfClass operator + (const SelfClass &str) const @@ -1277,35 +1277,35 @@ namespace hgl CompOperator(const T *,Comp); CompOperator(const SelfClass &,Comp); - };//template class BaseString + };//template class String //这种重载用于value+str的情况 //而类中的的重载用于str+value的情况 - template BaseString operator + (const V &value,const BaseString &str) + template String operator + (const V &value,const String &str) { if(str.Length()<=0) - return BaseString(value); + return String(value); - return BaseString(value)+str; + return String(value)+str; } - using AnsiString =BaseString; - using UTF8String =BaseString; - using UTF16String =BaseString; - using UTF32String =BaseString; - using OSString =BaseString; - using WideString =BaseString; + using AnsiString =String; + using UTF8String =String; + using UTF16String =String; + using UTF32String =String; + using OSString =String; + using WideString =String; - template bool ToNumber(const BaseString &str,int &value){return str.ToInt(value);} - template bool ToNumber(const BaseString &str,uint &value){return str.ToUint(value);} - template bool ToNumber(const BaseString &str,float &value){return str.ToFloat(value);} - template bool ToNumber(const BaseString &str,double &value){return str.ToFloat(value);} + template bool ToNumber(const String &str,int &value){return str.ToInt(value);} + template bool ToNumber(const String &str,uint &value){return str.ToUint(value);} + template bool ToNumber(const String &str,float &value){return str.ToFloat(value);} + template bool ToNumber(const String &str,double &value){return str.ToFloat(value);} /** * 以累加的方式为一个字符串计算出一个hash码 */ - template uint StringFastHash(const BaseString &str) + template uint StringFastHash(const String &str) { const T *p=str.c_str(); int c=str.Length(); @@ -1324,13 +1324,13 @@ namespace hgl * @return 转换好的字符串 * @see HexToString */ - template BaseString ToHexString(const I &value) + template String ToHexString(const I &value) { T str[(sizeof(I)<<1)+1]; ToUpperHexStr(str,value); - return BaseString(str); + return String(str); } /** @@ -1339,46 +1339,46 @@ namespace hgl * @param value 要转换的数值 * @see ToHexString */ - template BaseString HexToString(const I &value) + template String HexToString(const I &value) { T str[(sizeof(I)<<1)+1]; htos(str,sizeof(I)<<1,value); - return BaseString(str); + return String(str); } /** * 将一个指针转换成一个16进制字符串 */ - template BaseString PointerToHexString(const void *ptr) + template String PointerToHexString(const void *ptr) { return HexToString(reinterpret_cast(ptr)); } - inline BaseString PointerToHexOSString(const void *value) + inline String PointerToHexOSString(const void *value) { return PointerToHexString(value); } - inline BaseString PointerToHexUTF8String(const void *value) + inline String PointerToHexUTF8String(const void *value) { return PointerToHexString(value); } - inline BaseString PointerToHexUTF16String(const void *value) + inline String PointerToHexUTF16String(const void *value) { return PointerToHexString(value); } template - inline void strcpy(T *dst,int max_count,const BaseString &src) + inline void strcpy(T *dst,int max_count,const String &src) { hgl::strcpy(dst,max_count,src.c_str(),src.Length()); } template - inline void strcat(T *dst,int max_count,const BaseString &src) + inline void strcat(T *dst,int max_count,const String &src) { hgl::strcat(dst,max_count,src.c_str(),src.Length()); } diff --git a/inc/hgl/type/StringList.h b/inc/hgl/type/StringList.h index 258bde9..a96badd 100644 --- a/inc/hgl/type/StringList.h +++ b/inc/hgl/type/StringList.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include @@ -222,7 +222,7 @@ namespace hgl * @param size 字符串长度 * @return 字符串行数 */ - template int SplitToStringListBySpace(StringList > &sl,const T *str,int size) + template int SplitToStringListBySpace(StringList > &sl,const T *str,int size) { if(!str||size<=0)return(-1); @@ -237,7 +237,7 @@ namespace hgl { if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } @@ -249,7 +249,7 @@ namespace hgl { if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } @@ -262,7 +262,7 @@ namespace hgl if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } @@ -277,7 +277,7 @@ namespace hgl * @param split_char 分隔字符 * @return 字符串行数 */ - template int SplitToStringList(StringList > &sl,const T *str,int size,const T &split_char) + template int SplitToStringList(StringList > &sl,const T *str,int size,const T &split_char) { if(!str||size<=0)return(-1); @@ -292,7 +292,7 @@ namespace hgl { if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } @@ -304,7 +304,7 @@ namespace hgl { if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } @@ -317,14 +317,14 @@ namespace hgl if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } return count; }//int SplitToStringList - template int SplitToStringListFromString(StringList > &sl,const BaseString &str,const T &split_char) + template int SplitToStringListFromString(StringList > &sl,const String &str,const T &split_char) { return SplitToStringList(sl,str.c_str(),str.Length(),split_char); } @@ -338,7 +338,7 @@ namespace hgl * @param maxSize 最多执行次数 * @return 字符串行数 */ - template int SplitToStringList(StringList > &sl,const T *str,int size,const T &split_char,int maxSize) + template int SplitToStringList(StringList > &sl,const T *str,int size,const T &split_char,int maxSize) { if(!str||size<=0)return(-1); @@ -353,7 +353,7 @@ namespace hgl { if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } @@ -365,7 +365,7 @@ namespace hgl { if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } @@ -376,7 +376,7 @@ namespace hgl --size; if(size > 0) { - sl.Add(BaseString(sp,size)); + sl.Add(String(sp,size)); ++count; } @@ -390,14 +390,14 @@ namespace hgl if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } return count; }//int SplitToStringList - template int SplitToStringList(StringList > &sl,const BaseString &str,const T &split_char,int maxSize) + template int SplitToStringList(StringList > &sl,const String &str,const T &split_char,int maxSize) { return SplitToStringList(sl,str.c_str(),str.Length(),split_char,maxSize); } @@ -409,7 +409,7 @@ namespace hgl * @param size 字符串长度 * @return 字符串行数 */ - template int SplitToStringListByEnter(StringList > &sl,const T *str,int size) + template int SplitToStringListByEnter(StringList > &sl,const T *str,int size) { if(!str||size<=0)return(-1); @@ -424,7 +424,7 @@ namespace hgl { if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } @@ -434,7 +434,7 @@ namespace hgl if(*p==0x0D) // \r { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; ++p; @@ -451,7 +451,7 @@ namespace hgl else if(*p==0x0A) // \n { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; ++p; @@ -468,19 +468,19 @@ namespace hgl if(p>sp) { - sl.Add(BaseString(sp,p-sp)); + sl.Add(String(sp,p-sp)); ++count; } return count; }//int SplitToStringList - template int SplitToStringListByEnter(StringList > &sl,const BaseString &str) + template int SplitToStringListByEnter(StringList > &sl,const String &str) { return SplitToStringListByEnter(sl,str.c_str(),str.Length()); } - template int SplitToStringList(StringList > &sl,const BaseString &str) + template int SplitToStringList(StringList > &sl,const String &str) { return SplitToStringList(sl,str.c_str(),str.Length()); } @@ -493,7 +493,7 @@ namespace hgl * @param size 字符串长度 * @return 字符串行数 */ - template int SplitToMultiStringList(StringList > **sl,int slc,const T *str,int size) + template int SplitToMultiStringList(StringList > **sl,int slc,const T *str,int size) { if(!str||size<=0)return(-1); if(slc<=0)return(-1); @@ -510,7 +510,7 @@ namespace hgl { if(p>sp) { - sl[index]->Add(BaseString(sp,p-sp)); + sl[index]->Add(String(sp,p-sp)); if(++index==slc)index=0; ++count; } @@ -521,7 +521,7 @@ namespace hgl if(*p==0x0D) // \r { - sl[index]->Add(BaseString(sp,p-sp)); + sl[index]->Add(String(sp,p-sp)); if(++index==slc)index=0; ++count; @@ -540,7 +540,7 @@ namespace hgl else if(*p==0x0A) // \n { - sl[index]->Add(BaseString(sp,p-sp)); + sl[index]->Add(String(sp,p-sp)); if(++index==slc)index=0; ++count; @@ -559,14 +559,14 @@ namespace hgl if(p>sp) { - sl[index]->Add(BaseString(sp,p-sp)); + sl[index]->Add(String(sp,p-sp)); ++count; } return count; }//int SplitToStringList - template int SplitToMultiStringList(StringList > **sl,int slc,const BaseString &str) + template int SplitToMultiStringList(StringList > **sl,int slc,const String &str) { if(!sl||slc<=0)return(false); @@ -618,7 +618,7 @@ namespace hgl * @param dis 数据输入流 * @return 字符串行数 */ - template int LoadStringList(StringList > &sl,io::DataInputStream *dis) + template int LoadStringList(StringList > &sl,io::DataInputStream *dis) { if(!dis)return(-1); @@ -628,9 +628,9 @@ namespace hgl if(!dis->ReadInt32(count)) return(-2); - ReadStringFromDIS,bom> rsfd; + ReadStringFromDIS,bom> rsfd; - BaseString str; + String str; for(int i=0;i