N
noelse520
Unregistered / Unconfirmed
GUEST, unregistred user!
function getMaxValue(str: string):string;
begin
str := copy(str,pos('-',str)+1,Length(str));
if Pos('-',str)>0 then
getMaxValue(str);
Result := str;
end;
我用如上函数想把字符串,形如“-10-40-100”得到最后一个减号后面的数。但我得到的是空,不知道错在哪儿,哪个大哥帮我下忙~!
begin
str := copy(str,pos('-',str)+1,Length(str));
if Pos('-',str)>0 then
getMaxValue(str);
Result := str;
end;
我用如上函数想把字符串,形如“-10-40-100”得到最后一个减号后面的数。但我得到的是空,不知道错在哪儿,哪个大哥帮我下忙~!