REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    Comparing 2 strings

    REXYGEN Studio
    2
    5
    1.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      RexPeter
      last edited by

      I'm looking for a function block comparing two strings and generate a logic output of "1" when equal and "0" if NOT equal.
      But I could not find a string function block that is doing that. I noticed the STOR block and tried to convert to real and compare the real values, but the output of the STOR block is always "0" so when comparing that with another string that was converter to Real is not working.
      I guess I might have overlooked another function block that I need for this purpose.

      Any feedback on this will be appreciated.

      Best regards,
      Peter

      1 Reply Last reply Reply Quote 0
      • cechuratC
        cechurat
        last edited by

        Hi Peter,

        thanks for interesting question. It is possible to compare two strings comparing their length and position of one substring in the other one - see attached .mdl file.

        PS: function block for comparing strings is on our todo list 😉

        Regards, Tomas

        0_1564651561671_string_equality.mdl

        R 2 Replies Last reply Reply Quote 0
        • R
          RexPeter @cechurat
          last edited by

          @cechurat
          Thanks a lot Tomas,
          I will have a look at the example later this afternoon.

          Thanks and best regards

          1 Reply Last reply Reply Quote 0
          • R
            RexPeter @cechurat
            last edited by

            @cechurat

            This works great! Thanks a lot for this example!

            Peter

            cechuratC 1 Reply Last reply Reply Quote 0
            • cechuratC
              cechurat @RexPeter
              last edited by

              @rexpeter You are welcome 😉 Glad I could help.

              Cheers, Tomas

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

              There is also an outdated REXYGEN community forum.

              Powered by NodeBB.