add new space char

This commit is contained in:
2020-09-08 22:05:08 +08:00
parent a30567c431
commit 512894f080
3 changed files with 36 additions and 16 deletions

View File

@@ -6,6 +6,7 @@
namespace hgl
{
#define HGL_OFFICAL_WEB "www.hyzgame.com"
#define HGL_OFFICAL_WEB_U8 u8"www.hyzgame.com"
#define ENUM_CLASS_RANGE(begin,end) BEGIN_RANGE=begin,END_RANGE=end,RANGE_SIZE=(END_RANGE-BEGIN_RANGE)+1

View File

@@ -73,12 +73,25 @@ namespace hgl
if(filename.Length()<=1)
return(String<T>());
const int pos=filename.FindRightChar(split_char);
const T spear_char[] = { '/','\\' };
const int dot=filename.FindRightChar(split_char);
const int pos=filename.FindRightChar(spear_char);
if(dot==-1)
{
if(pos==-1)
return String<T>(filename);
return filename.SubString(0,pos);
else
return filename.SubString(pos+1);
}
else
{
if(pos==-1)
return filename.SubString(0,dot);
else
return filename.SubString(pos+1,dot-pos-1);
}
}
/**

View File

@@ -159,11 +159,13 @@ namespace hgl
return(ch==0
||ch==' ' //半角空格
||ch==HGL_FULL_SPACE //全角空格
||ch=='\t'
||ch=='\r'
||ch=='\a'
||ch=='\b'
||ch=='\f'
||ch=='\v'
||ch=='\n');
||ch=='\n'
||ch=='\r'
||ch=='\t'
||ch=='\v');
}
/**
@@ -174,11 +176,13 @@ namespace hgl
{
return(ch==0
||ch==' ' //半角空格
||ch=='\t'
||ch=='\r'
||ch=='\a'
||ch=='\b'
||ch=='\f'
||ch=='\v'
||ch=='\n');
||ch=='\n'
||ch=='\r'
||ch=='\t'
||ch=='\v');
}
#ifdef char8_t
@@ -187,11 +191,13 @@ namespace hgl
{
return(ch==0
||ch==' ' //半角空格
||ch=='\t'
||ch=='\r'
||ch=='\a'
||ch=='\b'
||ch=='\f'
||ch=='\v'
||ch=='\n');
||ch=='\n'
||ch=='\r'
||ch=='\t'
||ch=='\v');
}
#endif//char8_t