function Getcaption_Fixed(LabelLen:integer;var InputStr:string):string;
var
i:integer;
begin
if ByteType(InputStr,LabelLen) = mbLeadByte then
begin
Result:=Copy(InputStr,1,LabelLen-1);
InputStr := copy(InputStr,LabelLen,Length(InputStr));
end
else
begin
Result:=Copy(InputStr,1,LabelLen);
InputStr := copy(InputStr,LabelLen+1,Length(InputStr));
end
end;
一个中文字符串想分成几段,就分别调用几次这个函数
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/166523/viewspace-767634/
,如需转载,请注明出处,否则将追究法律责任。