|
// *********************************************************
// 文字列中に存在している文字のみで構成されているかどうか
// 戻り値 : true 構成されている, false されていない
// *********************************************************
BOOL LboxString::IsGroup( LboxString *LGroup )
{
return LboxString::IsGroup( LGroup->szLboxString );
}
BOOL LboxString::IsGroup( LPTSTR lpGroup )
{
int i,nLen;
char buff[10];
nLen = lstrlen( this->szLboxString );
for( i = 0; i < nLen; i++ ) {
if ( IsDBCSLeadByte( (BYTE)(*((this->szLboxString)+i)) ) ) {
buff[0] = (*((this->szLboxString)+i));
buff[1] = (*((this->szLboxString)+i+1));
buff[2] = 0x00;
i++;
}
else {
buff[0] = (*((this->szLboxString)+i));
buff[1] = 0x00;
}
if ( StrStr( lpGroup, buff ) == NULL ) {
return false;
}
}
return true;
}
| |