Edit Script

StringEngine Reference

Managing Text Item Delimiters

store_delimiters

現在の AppleScript's text item delimiters を保存して、テキスト処理のための Handler を呼ぶ準備をします。

restore_delimiters

AppleScript's text item delimiters を store_delimiters() によって保存されていたものに戻します。

Replacing Strings

replace

文字列の中に含まれる特定の文字列を別の文字列に置換します。結果は Unicode text class になります。

replace_as_unicode

replace と同じです。

replace_as_string

文字列の中に含まれる特定の文字列を別の文字列に置換します。結果は string class になります。

Replacing word

replace_word

文字列の中に含まれるワードを別の文字列に置換します。英単語、ソースコード中の変数名の置換などに用いることができます。

word_charset

設定されているワード文字セットを取得します。

set_word_charset

ワード文字セットを設定します。

Splitting a String by a Delimiter

split

文字列を指定した delimiter で分解した文字列のリストを取得します。

Join List of Texts

join

string もしくは Unicode text のリストを、指定された区切り文字を使って連結した文字列(Unicode text)を作ります。

join_as_unicode

join と同じです。

join_as_string

string もしくは Unicode text のリストを、指定された区切り文字を使って連結した文字列(string)を作ります。

Removing White Space Characters

strip

文字列の先頭と末尾の空白文字 (space, tab, return, line feed) を除去します。

strip_beginning

文字列の先頭の空白文字 (space , tab, return, line feed) を除去します。

strip_endding

文字列の末尾の空白文字 (space , tab, return, line feed) を除去します。

Converting New Line Characters

use_return

改行コードを CR(carriage return, Mac方式)に変換します。

use_linefeed

改行コードを LF(line feed, Unix方式)に変換します。

use_crlf

改行コードを CRLF(Windows 方式)に変換します。

Utilities

plain_text

Styled Text(Unicode text を含む)を Plain Text に変換します。

formated_text

a_text 中の "$1", "$2"... という文字列を、item 1 of a_list, item 2 of a_list ... で置き換えます。ダイアログなどに表示するメッセージを作るのに便利です。