这个函数是什么意思啊
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;
...全文
相关推荐
Python pandas 中loc函数的意思及用法
Python pandas 中loc函数的意思及用法
EXcel函数解释 常见函数的意思解释
EXcel函数解释,包括常见函数的名称、意义和用法,文档包含多个宏文件,但无病毒,谢谢使用
七个很有意思的PHP函数
主要介绍了七个很有意思的PHP函数,这些函数鲜为人知,但很实用,需要的朋友可以参考下
【Python笔记】之Python函数中参数前带*是什么意思
背景 前几天看了些python的代码,发现有些函数的参数前带有(*)号,有的甚至有两个(*)号,不清楚它们代表什么意思。 解释 查阅资料后发现,参数前面加上* 号 ,意味着参数的个数不止一个,另外带一个星号(*)参数的函数传入的参数存储为一个元组(tuple),带两个(*)号则是表示字典(dict) 参数带星号表示支持可变不定数量的参数,这种方法叫参数收集。 星号又可以带1个或2个,带1个表示按位置来收集参数,带2个星号表示按关键字来收集参数。 1、带一个星号的参数收集模式: 这种模式是在函数定义时在某个形参前面加一个星号,调用时按位置匹配不带星号的形参和实参,多余的实参都将作为一个元组的元素
python内置函数意思.docx
初学python者


