1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>ENV_SearchByPartialName</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">ENV_SearchByPartialName <img src="../image/NTR.gif"align="middle"><img src="../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD> 15 <PRE><CODE>#include <nitro/env.h></CODE></PRE> 16 <PRE><CODE>ENVResource* ENV_SearchByPartialName( 17 ENVResourceIter* iter, 18 const char* partialName ); 19 </CODE></PRE> 20</DL> 21<H2>Arguments</H2> 22<TABLE border="1"> 23 <TBODY> 24 <TR> 25<TD><SPAN class="argument">iter</SPAN></TD> 26<TD>Resource iterator</TD> 27 </TR> 28 <TR> 29<TD><SPAN class="argument">partialName</SPAN></TD> 30<TD>String to be searched for in the name</TD> 31 </TR> 32 </TBODY> 33</TABLE> 34<H2>Return Values</H2> 35<P>Returns a pointer to the resource if it was obtainable. If the pointer is unobtainable, it returns <CODE>NULL</CODE>.</P> 36<H2>Description</H2> 37<P>Searches for and gets a resource that contains a designated string in the resource name.</P> 38<P>Be sure to prepare a resource iterator in advance and initialize it with <A href="ENV_InitIter.html"><CODE>ENV_InitIter</CODE></A>. By continuously searching with this iterator, you can successively get resources that match the conditions.</P> 39<P>Whether the string is included in the resource name is determined by whether the specified string, with the period treated as a character, is included in the resource name. This is case-sensitive.</P> 40<P>For example, when searching for a resource whose resource name contains "<CODE>1.test</CODE>":</P> 41<BLOCKQUOTE><CODE>"class.1.test"<BR> 42"class.321.testtest"<BR> 43"class.tmp.1.test.val"</CODE></BLOCKQUOTE> 44<P>all have matches, but:</P> 45<BLOCKQUOTE><CODE>"class.1"<BR> 46"class.1test"<BR> 47"class.1..test"</CODE><BR> 48 <CODE>"class.1 .test" (containing a space after 1)</CODE></BLOCKQUOTE> 49<P>do not match.</P> 50<P><B>Example:</B><BR> 51Following is an example of getting a resource containing the string "<CODE>member</CODE>".</P> 52 53<BLOCKQUOTE style="background-color:#ffffcc"><PRE><FONT color=#ff0033>ENVResourceIter iter;</FONT> 54ENVResource* p; 55 56<FONT color=#ff0033>ENV_InitIter( &iter );</FONT> 57while( (p = <FONT color=#ff0033>ENV_SearchByPartialName( &iter, "member" )</FONT> ) ) 58{ 59 OS_Printf( "resource = %s\n", p->name ); 60}</PRE></BLOCKQUOTE> 61 62<H2>See Also</H2> 63<P><A href="ENV_Init.html"><CODE>ENV_Init</CODE></A><BR> 64 <A href="ENV_InitIter.html"><CODE>ENV_InitIter</CODE></A><BR> 65 <A href="ENV_SearchByMember.html"><CODE>ENV_SearchByMember</CODE></A><BR> 66 <A href="ENV_SearchByType.html"><CODE>ENV_SearchByType</CODE></A><BR> 67 <A href="ENV_SearchByClass.html"><CODE>ENV_SearchByClass</CODE></A><BR> 68 <A href="ENV_GetLastResourceSetFromIter.html"><CODE>ENV_GetLastResourceSetFromIter</CODE></A></P> 69<H2>Revision History</H2> 70<P>2005/08/23 Initial version.</P> 71<hr><p>CONFIDENTIAL</p></body> 72</HTML> 73