ProtoFlux:Replace First Substring

From Resonite Wiki
Replace First Substring
Str
*
SearchFor
ReplaceWith
StartIndex
Operators

Replace First Substring is a ProtoFlux node that replaces the first occurrence of SearchFor (String) in Str (String) with ReplaceWith (String). Will only start searching after the provided StartIndex (int).

Inputs

Str (String)

The string to search for SearchFor (String) in.

SearchFor (String)

The string to be replacing in Str (String).

ReplaceWith (String)

What to replace SearchFor (String) with.

StartIndex (int)

The point in the string to start searching from, rather than from the beginning.

Outputs

* (String)

Returns Str (String) with the first SearchFor (String) occurance replaced with ReplaceWith (String). But only after the point StartIndex (int) was searched after.

Examples