![MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Скачать руководство пользователя страница 335](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-developing-web/coldfusion-4-5-developing-web_develop-manual_3286369335.webp)
Chapter 18: Building Custom CFAPI Tags
309
CCFXStringSet::GetCount
int CCFXStringSet::GetCount(void)
Gets the number of strings contained in the string set. This value can be used along
with
CCFXStringSet::GetString
to iterate over the strings in the set (when iterating,
remember that the index values for strings in the list begin at 1).
Returns the number of strings contained in the string set.
Example
The following example demonstrates using
GetCount
along with
CCFXStringSet::GetString
to iterate over a string set and write the contents of the list
back to the user:
int nNumItems = pStringSet->GetCount() ;
for ( int i=1; i<=nNumItems; i++ )
{
pRequest->Write( pStringSet->GetString( i ) ) ;
pRequest->Write( "<BR>" ) ;
}
CCFXStringSet::GetIndexForString
int CCFXStringSet::GetIndexForString(LPCSTR
lpszString
)
Does a case insensitive search for the passed string.
If the string is found, its index within the string set is returned. If it is not found, the
constant
CFX_STRING_NOT_FOUND
is returned.
lpszString
String to search for.
Example
The following example illustrates searching for a string and throwing an exception if it
is not found:
CCFXStringSet* pAttribs = pRequest->GetAttributeList() ;
int iDestination =
pAttribs->GetIndexForString("DESTINATION") ;
if ( iDestination == CFX_STRING_NOT_FOUND )
{
pRequest->ThrowException(
"DESTINATION attribute not found."
"The DESTINATION attribute is required "
"by this tag." ) ;
}
Содержание COLDFUSION 4.5-DEVELOPING WEB
Страница 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Страница 14: ...xiv Developing Web Applications with ColdFusion...
Страница 26: ...xxvi Developing Web Applications with ColdFusion...
Страница 34: ...8 Developing Web Applications with ColdFusion...
Страница 70: ...44 Developing Web Applications with ColdFusion...
Страница 84: ...58 Developing Web Applications with ColdFusion...
Страница 114: ...88 Developing Web Applications with ColdFusion...
Страница 148: ...122 Developing Web Applications with ColdFusion...
Страница 174: ...148 Developing Web Applications with ColdFusion...
Страница 208: ...182 Developing Web Applications with ColdFusion...
Страница 244: ...218 Developing Web Applications with ColdFusion...
Страница 274: ...248 Developing Web Applications with ColdFusion...
Страница 288: ...262 Developing Web Applications with ColdFusion...
Страница 300: ...274 Developing Web Applications with ColdFusion...
Страница 350: ...324 Developing Web Applications with ColdFusion...
Страница 362: ...336 Developing Web Applications with ColdFusion...