# ENV_SearchByPartialName

## C Specification

      #include <nitro/env.h>

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

## Arguments

iter | The resource iterator.
`partialName` | A character string to be searched for in the name.

## Return Values

Returns a pointer to the resource if it was able to be obtained.
Returns a NULL if not.

## Description

This function searches for and obtains a resource that contains a designated character 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 obtain resources that match the conditions.

Whether the character string is included in the resource name is determined by whether the specified character string, with the period regarded 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)`

contain no matches.

(Example)
Below is an example of obtaining a resource containing the character 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_GetLastResourceSetForIter`

## Revision History

08/23/2005 Initial version.

CONFIDENTIAL