308
Example
The following example checks to see whether the DEBUG attribute is present, and if it
is, it writes a brief debug message:
if ( pRequest->Debug() )
{
}
CCFXStringSet Class
Abstract class that represents a set of ordered strings. Strings can be added to a set and
can be retrieved by a numeric index (the index values for strings are 1-based). To create
a string set, you should use CCFXRequest::CreateStringSet.
Class members
virtual int AddString( LPCSTR lpszString )
CCFXStringSet::AddString
virtual int GetCount()
CCFXStringSet::GetCount
virtual LPCSTR GetString( int iIndex )
CCFXStringSet::GetString
virtual int GetIndexForString( LPCSTR lpszString )
CCFXStringSet::GetIndexForString
CCFXStringSet::AddString
int CCFXStringSet::AddString(LPCSTR lpszString )
Adds a string to the end of the list. Returns the index of the string that was added.
lpszString
String to add to the list.
Example
The following example demonstrates adding three strings to a string set and saving the
indexes of the items that are added:
CCFXStringSet* pSet = pRequest->CreateStringSet() ;
int iRed = pSet->AddString( "Red" ) ;
int iGreen = pSet->AddString( "Green" ) ;
int iBlue = pSet->AddString( "Blue" ) ;
pRequest->WriteDebug( "Top secret debug info" ) ;
adds a string to the end of the list.
gets the number of strings contained in the list.
gets the string located at the passed index.
Developing Web Applications with ColdFusion
gets the index for the passed string.