LoginSignup
1
2

More than 3 years have passed since last update.

Deluge チートシート

Last updated at Posted at 2019-09-06

Deluge をあまり知らないので、予約語や組み込み関数/メソッドの一覧を備忘録として残しておく。網羅できているかどうかはわからない。本当は zoho.sheet.* のようなアプリケーションの機能の方に面白いものがあるのだろうが、Deluge の話題は Zoho CRM ばかりで、Zoho Workplace を使っている身としてはソレナンノコトだ。

条件分岐

if 文

if(<expr>)
{
...
}
else if(<expr>)
{
...
}
else
{
...
}

スクリプトエディターの自動整形機能がいまひとつで、冗長になる。

IF 関数

IF(<expr-if>, <expr-then>, <expr-else>)

短絡評価をするかどうかで使い勝手も変わるのだが、どっちなのかは調べていない。

IFNULL 関数

IFNULL(<expr>, <expr-ifnull>)

繰り返し

for each <var> in <list>

for each index <var> in <list>

これしかない。アプリケーションがスタックすると困るからだろう。

メール送信

sendmail
[
From : <expr>
To : <expr>
Subject : <expr>
Message : <expr>
]

メール送信はすごく楽だ。添付ができるかどうかは調べていない。

警告表示

alert <expr>;

情報表示

info <expr>;

リスト

{ ..., ..., ... }

List()

List:String() holds a list of string data.

List:Int() holds a list of int data.

List:Date(), List:Bool() and List:Float() are the same.

list.add(data)

list.remove(n)

list.removeElement(data)

list.addAll(list2)

list.removeAll(list2)

list.clear()

list.sort(<bool>)

辞書

{ "..." : "...", "..." : "...", ... }

<var> = map()

map.put(<key>, <value>)

map.put(<sourcemap>)

map.remove(<key>)

map.clear()

外部アクセス

getUrl(<urlstr>)

postUrl(<urlstr>, <map-variable>, true)

組込定数

zoho.currentdate

zoho.currenttime

zoho.loginuser

zoho.loginuserid

zoho.adminuser

zoho.adminuserid

zoho.appname

zoho.ipaddress

zoho.appuri

検索

<expr> in <list>

<expr> not in <list>

組み込み関数

<str>.contains(<str>)

<str>.endsWith(<str>)

<str>.startswith(<str>)

<str>.remove(<str>)

<str>.removeFirstOccurance(<str>)

<str>.removeLastOccurence(<str>)

<str>.getSuffix(<str>)

<str>.getPrefix(<str>)

<str>.toUpperCase()

<str>.toLowerCase()

<str>.getAlphaNumeric()

<str>.getAlpha()

<str>.removeAllAlphaNumeric()

<str>.removeAllAlpha()

<str>.length()

<str>.getOccurenceCount(<expr>)

<str>.indexOf(<expr>)

<str>.lastIndexOf(<expr>)

<str>.substring(<expr-start>, <expr-end>)

<str>.trim()

<str>.equalsIgnoreCase(<expr>)

<expr>.toString()

<str>.matches(<regexp>)

<str>.replaceAll(<expr-search>, <expr-replace>, <bool>)

<str>.replaceFirst(<expr-search>, <expr-replace>, <bool>)

leftpad(<str>, <int>)

rightpad(<str>, <int>)

leftpad(), rightpad() がスペースでのパディングしかできず直接ゼロパディングできないところが惜しい。また replaceAll()<expr-search> が文字列しか取れないのも地味に残念だ。正規表現は matches() でのみ使える。そして正規表現の仕様は "The regular expression." としか書かれていないのが清々しい。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2