#习题38 区分列表和字符串,用到了split(字符串专用函数),join.append.pop(这些是list操作函数) ten_things = "Apples Oranges Crows Telephone Liht Sugar" print "Wait there is not 10 things in that list, let's fix that." stuff=ten_things.split(' ') more_stuff = ["Da…
var S:String; P:PChar; B:array of Byte;begin S:='Hello'; SetLength(B,Length(S)+1); P:=PChar(S); CopyMemory(B,P,Length(S)+1); ShowMessage(Char(B[0]));end; Length(S)+1 可以拷贝字符串最后的 #0 var str:string; B:array of byte; begin str:='string'; setlengt…