Form Form1 {
Width = 400;
Height = 223;
EditBox EditBox1 {
X = 27;
Y = 25;
Width = 181;
Height = 70;
}
EditBox EditBox2 {
X = 28;
Y = 113;
Width = 181;
Height = 70;
}
Button Button1{
X = 225;
Y = 29;
Width = 101;
Height = 42;
Title = "指定の文字を除去";
Function OnTouch( e ) {
var str = new String(^.EditBox1.Value);
/* 文字列の前後からスペース(半角・全角)、
タブ、改行を取り除く */
^.EditBox2.Value = str.trim(" \t\r\n ");
}
}
}
|