Index Of
DataTarget independent
text.index-ofPosition of the first occurrence of Sub in the text (counting from 0, a CJK character counts as 1). -1 when not found. To just test "contains", use the Contains node.
Example use
Find the first colon and handle a result of -1 when none exists.
Node preview
Right-drag to pan and scroll to zoom. Expand inputs and edit parameters to see how ports change. This preview does not run the node; reopening the page restores the example.
Loading node preview…
Data inputs 2
- Text
textString The text this node reads, converts, searches or types.
Default availableDefault:""- Search text
searchString The substring to find or test for presence.
Default availableDefault:""
Data outputs 1
- Result
resultInteger The result of this data operation, with its type determined by the matching inputs.
- Minimum: -9007199254740991
- Maximum: 9007199254740991
Value format examples
042
Version and node identity
Version 1.0.0
sha256:0b978673c4dddbfbd2591a4b663d08e4b03175cc7fe681e7759af5a4ee080d2b