Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Teams
, (opens new window)

Power Scripts for Jira Cloud
Results will update as you type.
  • Get started
  • Configuration guides
  • Integration guides
  • Feature guides
  • Advanced features
  • Migration resources
  • Simple Issue Language
    • Getting started with SIL
    • SIL reference guide
    • SIL Functions library
      • Function Index
      • Packages
      • Array Functions
      • Basic Functions
      • Date and Interval Functions
      • Excel Functions
      • File Manipulation Functions
      • HTTP Functions
      • Incoming Mail Processing Functions
      • Integration with Other Systems
      • Jira Administration Functions
      • Jira Integration Functions
      • Jira Service Management Functions
      • Jira Software Functions
      • Listener Functions
      • Math Functions
      • Parameter Functions
      • Scheduling Functions
      • String Functions
        • Encryption and Encoding Functions
        • allMatches
        • chop
        • contains
        • endsWith
        • executeTemplate
        • hashString
        • indexOf
        • isAlpha
        • isAlphaNumeric
        • isDigit
        • isLower
        • isNumeric
        • isUpper
        • join
        • lastIndexOf
        • length
        • matchEnd
        • matches
        • matchReplace
        • matchStart
        • matchText
        • replace
        • split
        • startsWith
        • substring
        • toLower
        • toUpper
        • trim
      • System Integration
      • Webhooks Functions
  • Tutorials and recipes
  • Jira Product Discovery support
  • Release notes
  • Help and support
    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    chop
    Updated Nov 19, 2024

    chop

    Description

    Returns a string, chopped at nmb characters, starting with the leftmost character. Cuts down the string (if length is greater than nmb characters) to a string of max nmb chars.

    Parameters

    Return Type

    String

    Examples

    Example 1

    wret = chop("Once upon a time", 6); print(wret);

    Print Once u

    Example 2

    wret = chop("Once upon a time", 30); print (wret );

    Print Once upon a time

    Example 3

    wret = chop(" Once upon a time", -1); print (wret );

    Print Once upon a time

    See also

    • Page:
      split
    • Page:
      executeTemplate
    • Page:
      trim
    • Page:
      replace
    • Page:
      matchStart
    • Page:
      lastIndexOf
    • Page:
      isUpper
    • Page:
      length
    • Page:
      contains
    • Page:
      matchReplace
    • Page:
      isDigit
    • Page:
      hashString
    • Page:
      chop
    • Page:
      toLower
    • Page:
      join
    • Page:
      indexOf
    • Page:
      startsWith
    • Page:
      endsWith
    • Page:
      matchEnd
    • Page:
      isLower
    • Page:
      isAlpha
    • Page:
      matches
    • Page:
      isNumeric
    • Page:
      isAlphaNumeric
    • Page:
      substring
    Peacock

    Need support? Create a request with our support team.

    Copyright © 2005 - 2025 Appfire | All rights reserved.

    {"serverDuration": 14, "requestCorrelationId": "e9a92b22594d4929bec7ddbf218b284b"}