本文整理汇总了C++中IsValidString函数的典型用法代码示例。如果您正苦于以下问题:C++ IsValidString函数的具体用法?C++ IsValidString怎么用?C++ IsValidString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsValidString函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wxCHECK
/// Gets the fret number on a given string
/// @param string String to get the fret number for
/// @return The fret number on the string
wxByte ChordDiagram::GetFretNumber(wxUint32 string) const
{
//------Last Checked------//
// - Jan 15, 2005
wxCHECK(IsValidString(string), 0);
return (m_fretNumberArray[string]);
}
示例2: PTB_CHECK_THAT
/// Sets the fret number for an existing string in the chordDiagram
/// @param string String to set the fret number for
/// @param fretNumber Fret number to set
/// @return True if the fret number was set, false if not
bool ChordDiagram::SetFretNumber(uint32_t string, uint8_t fretNumber)
{
PTB_CHECK_THAT(IsValidString(string), false);
PTB_CHECK_THAT(IsValidFretNumber(fretNumber), false);
m_fretNumberArray[string] = fretNumber;
return (true);
}
示例3: ASSERT
void CUnicodeString::TrimRight(LPCWSTR lpszTargets)
{
ASSERT(IsValidString(lpszTargets));
LPWSTR lpsz = m_Buffer;
LPWSTR lpszLast = NULL;
while(*lpsz != '\0')
{
if(wcschr(lpszTargets, *lpsz) != NULL)
{
if(lpszLast == NULL)
lpszLast = lpsz;
}
else
lpszLast = NULL;
lpsz = _wcsinc(lpsz);
}
if(lpszLast != NULL)
{
// truncate at left-most matching character
*lpszLast = '\0';
m_Length = lpszLast - m_Buffer;
}
}
示例4: whatsLeft
TBool CX509DomainName::AddSubdomainL(TInt& aPos)
{
TBool res = EFalse;
TInt end = iName->Length();
if (aPos >= end)
{
return res;
}
TPtrC whatsLeft(&(iName->operator[] (aPos)), end - aPos);
TInt subdomainEnd = whatsLeft.FindF(KX509SubdomainSeparator);
if (subdomainEnd == 0)
{
return res;
}
if (subdomainEnd == KErrNotFound)
{
subdomainEnd = end - aPos;
}
TPtrC subdomain(&whatsLeft[0], subdomainEnd);
if (IsValidString(subdomain))
{
REP_APPEND_L(subdomain);
res = ETrue;
}
aPos = aPos + subdomainEnd;
return res;
}
示例5: V_strstr
bool SizzlingProtect::IsChatExploit( const CCommand &args, int ClientCommandIndex )
{
const char *pChar = V_strstr( args.ArgS(), "%" );
while ( pChar )
{
if ( !IsValidString(&pChar) )
{
return true;
}
pChar = V_strstr( pChar, "%" );
}
return false;
}
示例6: Empty
const CUnicodeString& CUnicodeString::operator =(LPCSTR pstrString)
{
if(pstrString == NULL)
{
Empty();
return *this;
}
ASSERT(IsValidString(pstrString));
if(m_Buffer)
free(m_Buffer);
InitializeFromString(pstrString);
return *this;
}
示例7: assert
BOOL CSeException::GetErrorMessage(LPTSTR lpszError, UINT nMaxError, PUINT pnHelpContext/* = NULL*/)
{
assert(lpszError != NULL && IsValidString(lpszError, nMaxError));
if (pnHelpContext != NULL)
*pnHelpContext = 0;
string strMessage;
GetErrorMessage(strMessage);
if ((UINT)strMessage.size() >= nMaxError) {
lpszError[0] = 0;
return FALSE;
} else {
lstrcpyn(lpszError, strMessage.c_str(), nMaxError);
return TRUE;
}
}