Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1781

Have $find return "" rather than "-1" on not found

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.2
    • Component/s: Scripting
    • Labels:
      None

      Description

      The `$find` scripting function currently returns "-1" if `needle` is not found in `haystack`.  This was based on the return value of the Python `find` method.  This is not consistent with other Picard scripting functions, which return "" for a `False` (not found?) condition.  For consistency, consider changing the `$find` function to return "" on a "not found" condition.

        Attachments

          Activity

            People

            • Assignee:
              rdswift Bob Swift
              Reporter:
              rdswift Bob Swift
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Packages

                Version Package
                2.3.2