<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="../../../design/description.xslt" type="text/xsl"?>
<node lang="en" type="DynamicNode.Lib.Text.NStringReplace" assembly="NLibDefault" xmlns="http://dynamicnodes.mastersign.de/description">
  <caption>Replace</caption>
  <group>Text</group>
  <description>Searches for a string or a regular expression inside another string and replaces the matches with a third string.</description>
  <inPorts>
    <port name="haystack">
      <type>System.String</type>
      <description>The string to be searched.</description>
    </port>
    <port name="needle">
      <type>System.String</type>
      <description>The search string or a regular expression.</description>
    </port>
    <port name="replace">
      <type>System.String</type>
      <description>The replacement for the matches.</description>
    </port>
    <port name="regex">
      <type>System.Boolean</type>
      <description>
        A value indicating if the needle string should be interpreted as a regular exression.
        If a value with <c>true</c> is present, the string to find is interpreted as a regular expression;
        otherwise the string to find is interpreted as string literal.
      </description>
    </port>
    <port name="count">
      <type>System.Int32</type>
      <description>The maximal number of matches to replace.</description>
    </port>
    <port name="startAt">
      <type>System.Int32</type>
      <description>An integer to specify the zero based index of the first regarded character in the haystack string.</description>
    </port>
  </inPorts>
  <outPorts>
    <port name="result">
      <type>System.String</type>
      <description>The resulting string with the replaced matches.</description>
    </port>
  </outPorts>
  <helpText>
    This node searches a string (haystack) for a pattern (needle) in form of a literal or a regular expression
    and replaces the matches with a replacement string.
  </helpText>
</node>