# ENV_SearchByPartialName

## Syntax

      #include <nitro/env.h>

      ENVResource* ENV_SearchByPartialName(
                 ENVResourceIter*  iter,
                 const char*       partialName );

## Arguments

iter | Resource iterator
partialName | String to be searched for in the name

## Return Values

Returns a pointer to the resource if it was obtainable. If the pointer is unobtainable, it returns `NULL`.

## Description

Searches for and gets a resource that contains a designated string in the resource name.

Be sure to prepare a resource iterator in advance and initialize it with `ENV_InitIter`. By continuously searching with this iterator, you can successively get resources that match the conditions.

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.

For example, when searching for a resource whose resource name contains "`1.test`":

> `"class.1.test"
> "class.321.testtest"
> "class.tmp.1.test.val"`

all have matches, but:

> `"class.1"
> "class.1test"
> "class.1..test"`
> `"class.1 .test" (containing a space after 1)`

do not match.

Example:
Following is an example of getting a resource containing the string "`member`".

>     ENVResourceIter  iter;
>     ENVResource*    p;

>     ENV_InitIter( &iter );
>     while( (p = ENV_SearchByPartialName( &iter, "member" ) ) )
>     {
>        OS_Printf( "resource = %s\n", p->name );
>     }

## See Also

`ENV_Init`
`ENV_InitIter`
`ENV_SearchByMember`
`ENV_SearchByType`
`ENV_SearchByClass`
`ENV_GetLastResourceSetFromIter`

## Revision History

2005/08/23 Initial version.

CONFIDENTIAL