經(jīng)過(guò)測(cè)試發(fā)現(xiàn)trim(字符數(shù)組),返回的結(jié)果為字符數(shù)組從開始到第一個(gè)‘#0’的內(nèi)容
delphi中copy函數(shù)
copy
舉個(gè)例子:str := “123456”;str1 := Copy(Str,2,3);結(jié)果就是 str1 等于 234。Copy有3個(gè)參數(shù),第一個(gè)是你要處理的字符串,第二個(gè)是你要截取的開始位置,第3個(gè)是截取位數(shù)。當(dāng)你的第3個(gè)參數(shù)大于字符長(zhǎng)度,那么效果就是取 開始位置 后的所有字符。str1 := Copy(Str,2,10); 結(jié)果就是str1 等于 23456。
delphi中StrCopy函數(shù)
function StrCopy(Dest: PChar; const Source: PChar): PChar;
Description
Use StrCopy to copy Source to Dest. StrCopy returns Dest.
StrCpy does not perform any length checking. The destination buffer must have room for at least StrLen(Source)+1 characters.
For length checking, use the StrLCopy function.