Index Of String (LogiX node)

From Neos Wiki
Jump to navigation Jump to search
Other languages:
English • ‎日本語
Index Of String
'Index Of String' LogiX node
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!

Examples

IndexOfString.jpg

Node Menu

String
Back Characters Quick Format Special Characters + < >
× Capitalize Compare Strings Contains Empty String
Ends With Escape String Format Get Type Index Of String Is String Empty New Line
Null String Replace First Substring Replace Substring Reverse String Starts With String Insert String Join
String Length String Remove Strip RTF Tags Substring To Lower To String To Upper
Trim String Unescape String