应该就是串分割吧.我以前有过一段代码来分割串的:// 将一由指定字串分隔的字符串分解到字串列表中 // 参数: StrV-被分解的字符串(就是你的文本) PrtSymbol-分隔符(你这里就是'▋') // 返回: 字符串列表(TStringList),注意在使用后要将其释放 function PartitionString(StrV,PrtSymbol: string): TStringList; var iTemp: integer; begin result := TStringList.Create; iTemp := pos(PrtSymbol,StrV); while iTemp>0 do begin if iTemp>1 then result.Append(copy(StrV,1,iTemp-1)); delete(StrV,1,iTemp+length(PrtSymbol)-1); iTemp := pos(PrtSymbol,StrV); end; if Strv<>'' then result.Append(StrV); end;你可以参考一下算法,只用直扫入就行了,还是比较简单的.
// 参数: StrV-被分解的字符串(就是你的文本) PrtSymbol-分隔符(你这里就是'▋')
// 返回: 字符串列表(TStringList),注意在使用后要将其释放
function PartitionString(StrV,PrtSymbol: string): TStringList;
var
iTemp: integer;
begin
result := TStringList.Create;
iTemp := pos(PrtSymbol,StrV);
while iTemp>0 do begin
if iTemp>1 then result.Append(copy(StrV,1,iTemp-1));
delete(StrV,1,iTemp+length(PrtSymbol)-1);
iTemp := pos(PrtSymbol,StrV);
end;
if Strv<>'' then result.Append(StrV);
end;你可以参考一下算法,只用直扫入就行了,还是比较简单的.
文本框中输入'▋',就可以自动分离了。第三,在应用程序中也可以自己编程,不过,效率会低点,可以考虑结合使用存储过程。