,ascii('A').prt;
D:\sample\lib>adp ascii.p 65
,cat( 'This ', 'is ', 'a ', 'pen.').prt;
D:\sample\lib>adp cat.p This is a pen.
,chr(0x41).prt;
D:\sample\lib>adp chr.p A
+t('This is a pen. I have the pen. I give you the pen.'); ,t.instr('pen').prtn,next; ,prtn; ,t.instr('pen',10).prtn,next; ,prtn; ,t.instr('pen',11).prtn,next; ,prtn;
D:\sample\lib>adp instr.p 10 26 46 10 26 46 26 46
+t('This is a pen. I have the pen. I give you the pen.'); ,t.instrrev('pen').prtn,next; ,prtn; ,t.instrrev('pen',30).prtn,next; ,prtn; ,t.instrrev('pen',10).prtn,next;
D:\sample\lib>adp instrrev.p 46 26 10 26 10 10
,$x = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ,left($x,4).prtn ,mid($x,3,4).prtn ,right($x,4).prtn ;
D:\sample\lib>adp mid.p ABCD DEFG WXYZ
,now.prtn; ,now(86400).prtn;
Thu Apr 28 20:44:29 2011 Fri Apr 29 20:44:29 2011
,$x = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ,left($x,4).prtn ,mid($x,3,4).prtn ,right($x,4).prtn ;
D:\sample\lib>adp mid.p ABCD DEFG WXYZ
,file('sha1.p').sha1.prt;
D:\sample\lib>adp sha1.p D62745C8425675EE054CFA89D982DC746CF4E062
,$x = "This is a pen", split($x, ' ').each.prtn,next;
D:\sample\lib>adp split.p This is a pen
,sprintf("文字列", 10, 3.14159265, 2560000, "%s::%03d / %5.2f / %,").prt;
D:\sample\lib>adp sprintf.p 文字列:010 / 3.14 / 2,560,000
_global({ :key1=>10, :key2=>'test', :key3=>10.5}, 'test'); global('test').sprintf("%d:key1; %s:key2; %f:key3;").prtn;
D:\sample\lib>adp sprintf2.p 10 test 10.500000
,str(10).prtn; ,str(10.2).prtn;
D:\sample\lib>adp str.p 10 10.200000
,$x = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ,left($x,4).prtn ,mid($x,3,4).prtn ,right($x,4).prtn ;
D:\sample\lib>adp mid.p ABCD DEFG WXYZ
,$x = " ABC ", trim($x).prtn;
D:\sample\lib>adp trim.p ABC
,urldecode('%93%FA%96%7B%8C%EA%95%B6%8E%9A%97%F1%81iShift-JIS%81j').prtn;
D:\sample\lib>adp urldecode.p 日本語文字列(Shift-JIS)
,urlencode('日本語文字列(Shift-JIS)').prtn;
D:\sample\lib>adp urlencode.p %93%FA%96%7B%8C%EA%95%B6%8E%9A%97%F1%81iShift-JIS%81j