Find function – Multichannel Systems NeuroExplorer User Manual
Page 310
5.5.14.4. Find Function
Find Function
Looks for a substring inside a specified string.
Syntax
double Find(string1, string2)
Parameters
Parameter
Type
Description
string1
string
The string where we look for a substring.
string2
string
The substring that we are trying to find.
Returns
Looks for a string string2 inside the string string1, returns a number - the position of the first character
of string2 in the string1. Returns zero is string2 is not found.
Comments
None
Usage
NexScript
% this script selects only the neurons that have "05" in their name
doc = GetActiveDocument()
DeselectAll(doc)
for i=1 to GetVarCount(doc, "neuron")
name = GetVarName(doc, i, "neuron")
if Find(name, "05")> 0
SelectVar(doc, i, "neuron")
end
end
See Also
Introduction to NexScript Programming
Page 308