function GetSolidStr(const S: string): string;
var
Len: Byte;
FirstPos, LastPos: Byte;
begin
Result := '';
if S = '' then Exit; Len := Length(S);
FirstPos := 1;
while (FirstPos <= Len) and
(S[FirstPos] <= #32) do begin
Inc(FirstPos);
end;
if FirstPos > Len then Exit; for LastPos := Len downto FirstPos do begin
if S[FirstPos] > #32 then
Break;
end; Result := Copy ( S, FirstPos, LastPos - FirstPos +1 );
end;
var
Len: Byte;
FirstPos, LastPos: Byte;
begin
Result := '';
if S = '' then Exit; Len := Length(S);
FirstPos := 1;
while (FirstPos <= Len) and
(S[FirstPos] <= #32) do begin
Inc(FirstPos);
end;
if FirstPos > Len then Exit; for LastPos := Len downto FirstPos do begin
if S[FirstPos] > #32 then
Break;
end; Result := Copy ( S, FirstPos, LastPos - FirstPos +1 );
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货