Index Of String (LogiX node)
(Redirected from Logix Node IndexOfString)
Jump to navigation
Jump to search
Index Of String | ||
---|---|---|
Inputs | ||
String | Str | |
String | Part | |
Int | StartIndex | |
Bool | SearchFromEnd | |
Outputs | ||
Int | * |
The Index Of String node outputs the position index within the Str
where a substring exactly matching the input Part
is present.
Usage
The StartIndex
defines the position within the input Str
where searching for the Part
begins. The default value is 0.
The SearchFromEnd
input determines in which direction the search proceeds from the StartIndex
. If false (the default) searching is left-to-right, otherwise it is right-to-left if true.
The default output is -1. This may occur in the event that the Str
or Part
is null or an empty string, or if the Part
cannot be found given the current inputs.
Note that the StartIndex
needs to be set to a larger value (generally the length of the Str
- 1) since the reversed search still proceeds from this index!