diff --git a/inc/hgl/type/StrChar.h b/inc/hgl/type/StrChar.h index 26f531b..e879381 100644 --- a/inc/hgl/type/StrChar.h +++ b/inc/hgl/type/StrChar.h @@ -263,6 +263,24 @@ namespace hgl return(!iscodechar(ch)); } + /** + * 测试当前字符是否为文件名可用字符(不含路径分隔符) + */ + template + const bool isfilenamechar(const T &ch) + { + return(ch=='.'||iscodechar(ch)); + } + + /** + * 测试当前字符是否不是文件名可用字符 + */ + template + const bool notfilenamechar(const T &ch) + { + return(!isfilenamechar(ch)); + } + /** * 测试当前字符是否为BASE64编码字符 */