Search code examples
applescript

AppleScript: remove last character in text string


I need to remove the last character in a text string AppleScript. It's proving to the much more difficult problem than I thought. can someone explain how this would be done?


Solution

  • Try this

    set t to "this is a string"
    text 1 thru -2 of t
    

    Output:

    "this is a strin"