delphi split函式 積累

2021-04-20 06:48:47 字數 501 閱讀 7071

function splitstring(const source,ch:string):tstringlist;

vartemp:string;

i:integer;

chlength:integer;

begin

result:=tstringlist.create;

//如果是空自符串則返回空列表

if source='' then exit;

temp:=source;

i:=pos(ch,source);

chlength := length(ch);

while i<>0 do

begin

result.add(copy(temp,0,i-chlength+1));

delete(temp,1,i-1 + chlength);

i:=pos(ch,temp);

end;

result.add(temp);

end;

excel函式積累

1 根據日期計算星期幾 1 weekday serial number,return type serial number 必需。乙個序列號,代表嘗試查詢的那一天的日期。應使用 date 函式輸入日期,或者將日期作為其他公式或函式的結果輸入。例如,使用函式 date 2008,5,23 輸入 200...

MFC函式積累

1.waitforsingleobject dword winapi waitforsingleobject in handle hhandle,in dword dwmilliseconds waitforsingleobject函式用來 檢測hhandle事件的訊號狀態 在某一線程中呼叫該函式時...

oracle函式積累

quote 時間日期 url decode的語法 decode value,if1,then1,if2,then2,if3,then3,else 表示如果value等於if1時,decode函式的結果返回then1,如果不等於任何乙個if值,則返回else。replace field,oldvalu...