メインコンテンツまでスキップ
バージョン:25.2

join, joined by

  • Command, Function, Operator
    • Synonyms: combine, combined

    • The split and join (or combine) commands can be called as functions as well as commands. Having these available as functions makes it easy to use the resulting value:

    • Example:

      set path to "/Users/doug/Documents"
      put split(path, "/") into components
      insert "Eggplant" after components
      set newPath to join(components, "/")
      put newPath --> /Users/doug/Documents/Eggplant
    • The functions may also be called using an operator-like syntax:

      • source split by itemDelim {and keyDelim}
      • source joined by itemDelim {and keyDelim}
        • note: the words using or with may be used in place of by, and combined in place of joined
    • Example:

      put path split by "/" into components
      set newPath to components joined using "/"