菜 菜鸟编程 Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-05 #1 请教如何获得字符串的首字符?有没有这样的一个函数?字符串是不定长的。十万火急,在线等
J jackchin Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-05 #4 function GetFirstChar(const S: String): Char; begin if Length(S) > 0 then Result := S[1] else Result := #0 end;
function GetFirstChar(const S: String): Char; begin if Length(S) > 0 then Result := S[1] else Result := #0 end;
X XWHope Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-05 #5 str:string; copy(str,1,1) str[1]