added qse_mbsxistype(0 and qse_wcsxistype()

This commit is contained in:
2018-01-12 08:44:41 +00:00
parent 5e3507e836
commit fa21cef920
2 changed files with 38 additions and 0 deletions

View File

@ -38,6 +38,19 @@ int qse_mbsistype (const qse_mchar_t* str, qse_mctype_t type)
return 1;
}
int qse_mbsxistype (const qse_mchar_t* str, qse_size_t len, qse_mctype_t type)
{
const qse_mchar_t* end = str + len;
while (str < end)
{
if (!qse_ismctype(*str, type)) return 0;
str++;
}
return 1;
}
/* -------------------------------------------------------------------------- */
int qse_wcsistype (const qse_wchar_t* str, qse_wctype_t type)
{
while (*str)
@ -47,3 +60,14 @@ int qse_wcsistype (const qse_wchar_t* str, qse_wctype_t type)
}
return 1;
}
int qse_wcsxistype (const qse_wchar_t* str, qse_size_t len, qse_wctype_t type)
{
const qse_wchar_t* end = str + len;
while (str < end)
{
if (!qse_iswctype(*str, type)) return 0;
str++;
}
return 1;
}