|
![]() |
![]() |
version 2003
PA_Unistring* PA_GetStringParameter (params; index)
Parameter | Type | Description | |
params | PA_PluginParameters | → | Parameters received in PluginMain |
index | short | → | Index of the parameter in params |
The first parameter starts at
index
1.
Example
Compare 2 strings.
void PluginMain( long selector, PA_PluginParameters params )
{
switch ( selector )
{
. . .kInitPlugin, kDeinitPlugin ...
case kMyRoutine :
MyCompare(params);
break;
}
}
// Declared as expecting a string, a string and returning a long (-1,0,1 for smaller, equal or bigger)
void MyCompare (PA_PluginParameters params)
{
PA_Unistring *first, *second;
char result = 0;
// get the parameters
first = PA_GetStringParameter(params, 1);
second = PA_GetStringParameter(params, 2);
// Compare them
result = PA_CompareUnistrings( first, second, true, false );
PA_ReturnLong(params, result);
}
See Also
About strings and characters , Create a new plugin .
Error Handling
keeps the last error that occurred
before
calling the routine.