Skip to content

← programming package

StringFind

Find the (zero-based) start index of a substring in a string.

Note that this defaults to returning -1 if the substring is not found. As with all string ops, None values are generally passed through. Version 1.0.0

Ports/Properties

string

String to process.

verbose name
String
default value
None
port type
DataPort
value type
str (can be None)
data direction
IN

result

Start index if found.

verbose name
Result
default value
None
port type
DataPort
value type
int (can be None)
data direction
OUT

substring

Substring to find.

verbose name
Substring
default value
None
port type
StringPort
value type
str (can be None)

notfound

Value to return if the substring is not found. This can also be set to None if desired.

verbose name
If Not Found
default value
-1
port type
IntPort
value type
int (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)