added: to misc:
void OnlyDigit(StringType & s, bool allow_comma = true)
removes all non-digit characters from a string
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@818 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -622,11 +622,11 @@ std::wstring::size_type i;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool IsEmailCorrectChar(wchar_t c)
|
||||
{
|
||||
bool correct = false;
|
||||
|
||||
|
||||
bool IsEmailCorrectChar(wchar_t c)
|
||||
{
|
||||
bool correct = false;
|
||||
|
||||
const wchar_t * allowed_chars = L"@.!#$%&'*+-/=?^_`{|}~";
|
||||
|
||||
if( (c >= 'A' && c<='Z') ||
|
||||
@@ -646,12 +646,12 @@ bool correct = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return correct;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return correct;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool ValidateEmail(const wchar_t * email)
|
||||
{
|
||||
int at = 0; // how many '@'
|
||||
@@ -674,13 +674,13 @@ bool ValidateEmail(const wchar_t * email)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool ValidateEmail(const std::wstring & email)
|
||||
{
|
||||
return ValidateEmail(email.c_str());
|
||||
}
|
||||
|
||||
return ValidateEmail(email.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user