知道就简单的问题UP有分

xzhongjin 2003-01-20 02:23:25
分不够可再加
在系统那个文件或库实现英文单词的识别(自动换行),没有的话如何实现给点建议,最好有程序哦
我有几个符号(自己做的),单独可用,结合起来也能用但不能换行,换行后就是错的该怎么办
...全文
41 23 打赏 收藏 转发到动态 举报
写回复
用AI写文章
23 条回复
切换为时间正序
请发表友善的回复…
发表回复
flyycyu 2003-01-20
  • 打赏
  • 举报
回复
up
silverwonder 2003-01-20
  • 打赏
  • 举报
回复
up了
用户 昵称 2003-01-20
  • 打赏
  • 举报
回复
up
TOMWLD 2003-01-20
  • 打赏
  • 举报
回复
你要写编辑器呀?!

不知道了,帮你up
VCBoyGirl 2003-01-20
  • 打赏
  • 举报
回复
wrapText()可以,
下面修改后可以换行中文的

加入 #13#10
function WrapTexts(const Line, BreakStr: string; const BreakChars: TSysCharSet;
MaxCol: Integer): string;
const
QuoteChars = ['''', '"'];
var
Col, Pos: Integer;
LinePos, LineLen: Integer;
BreakLen, BreakPos: Integer;
QuoteChar, CurChar: Char;
ExistingBreak: Boolean;
L: Integer;
begin
Col := 1;
Pos := 1;
LinePos := 1;
BreakPos := 0;
QuoteChar := ' ';
ExistingBreak := False;
LineLen := Length(Line);
BreakLen := Length(BreakStr);
Result := '';
while Pos <= LineLen do
begin
CurChar := Line[Pos];
if CurChar in LeadBytes then
begin
L := CharLength(Line, Pos) - 1;
Inc(Pos, L);
Inc(Col, L);
if Col>=MaxCol then
BreakPos:=Pos;
end
else
begin
if CurChar = BreakStr[1] then
begin
if QuoteChar = ' ' then
begin
ExistingBreak := CompareText(BreakStr, Copy(Line, Pos, BreakLen)) = 0;
if ExistingBreak then
begin
Inc(Pos, BreakLen-1);
BreakPos := Pos;
end;
end
end
else if CurChar in BreakChars then
begin
if QuoteChar = ' ' then BreakPos := Pos
end
else if CurChar in QuoteChars then
begin
if CurChar = QuoteChar then
QuoteChar := ' '
else if QuoteChar = ' ' then
QuoteChar := CurChar;
end;
end;
Inc(Pos);
Inc(Col);
if not (QuoteChar in QuoteChars) and (ExistingBreak or
((Col > MaxCol) and (BreakPos > LinePos))) then
begin
Col := Pos - BreakPos;
Result := Result + Copy(Line, LinePos, BreakPos - LinePos + 1);
if not (CurChar in QuoteChars) then
while Pos <= LineLen do
begin
if Line[Pos] in BreakChars then
Inc(Pos)
else if Copy(Line, Pos, Length(sLineBreak)) = sLineBreak then
Inc(Pos, Length(sLineBreak))
else
break;
end;
if not ExistingBreak and (Pos < LineLen) then
Result := Result + BreakStr;
Inc(BreakPos);
LinePos := BreakPos;
ExistingBreak := False;
end;
end;
Result := Result + Copy(Line, LinePos, MaxInt);
end;
zjhydx98 2003-01-20
  • 打赏
  • 举报
回复
up
diruser 2003-01-20
  • 打赏
  • 举报
回复
gz
haerbin982 2003-01-20
  • 打赏
  • 举报
回复
学习中!
weibz0525 2003-01-20
  • 打赏
  • 举报
回复
不懂,ocr?
kaolaxiong 2003-01-20
  • 打赏
  • 举报
回复
up
yaningou 2003-01-20
  • 打赏
  • 举报
回复
up
liqianglqlq 2003-01-20
  • 打赏
  • 举报
回复
#13#10
cgh1970 2003-01-20
  • 打赏
  • 举报
回复
up
gzyzljk 2003-01-20
  • 打赏
  • 举报
回复
UPUPUPUP
实在不知你讲什么啊????
应该是#13#10吧....
UP一下!
slley 2003-01-20
  • 打赏
  • 举报
回复
#13#10
smalldeer 2003-01-20
  • 打赏
  • 举报
回复
up
DainelLee 2003-01-20
  • 打赏
  • 举报
回复
问金山公司
windstrom 2003-01-20
  • 打赏
  • 举报
回复
tts 你是一下
breezing 2003-01-20
  • 打赏
  • 举报
回复
up
siyu2002 2003-01-20
  • 打赏
  • 举报
回复
up
加载更多回复(3)

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧