Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3616

int() policy function

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.18.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      0

      Description

      Similar to string(), sometimes it is convenient to have a function which converts something from string to integer type.

      Acceptance criteria:

      • Policy function int() has parameter type string and return type int
      • int() can be passed a real number or a string of a number with decimals
        • In both cases, the decimals will be chopped off (not rounded)
      • If passed something that is not an integer or a decimal number, it should error and fail
      • The new policy function should be documented in the documentation repo
      • The new policy function should have an acceptance test

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Alias Georgios Kotzampopoulos
              Reporter:
              olehermanse Ole Herman Schumacher Elgesem
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: