有一字符串'__i will love__you more than that'
如何从其中提取每一个单词并放在一个数组中(其中_为空格)
如何从其中提取每一个单词并放在一个数组中(其中_为空格)
解决方案 »
- 谁做过网页客服系统,问个问题
- 文本删除重复算法问题~~高手请指点下(keyz在吗 )
- 想找Delphi程序员帮我弄个东西!有兴趣的加Q:842972
- 关于用TNMHTTP实现在线升级,请高手帮忙解析调试,或其他实例!!!
- delphi 调用excel 表,填充数据,打印中存在一个问题
- 请教一个文件和字符串的问题
- 在自己编写的dll动态链接库中能否将MSCOMM这个控件弄进去??
- 怎么往记录中增加记录?
- 在DELPHI中,我怎样用两个字符去替换一字符串中的任意相邻的两个字符?
- 子类化,窗口过程,hookmainwindow的关系!!!!!***高分***
- 在DELPHI7的CORBA中调用COM对象为什么会失败?
- 如何清空一个table
s:=trim('__i will love__you more than that')for i:=0 to length(s)-1 do
begin
if s[i]<>' ' then
s1:=s1+s[i];
if (s[i]=' ') and (s1<>'') then
begin
a[j]:=s1;
inc(j);
s1:='';
end;
end;
var
s: string;
i: integer;
StrList: TStringList;
tempi: integer;
begin
Strlist:=TStringList.Create;
StrList:=TStringList.Create;
S := '__i will love__you more than that';
tempi:=0; for i:=0 to Length(s) -1 do
if not (S[i] in ['a'..'z' ,'A'..'Z']) then
begin
StrList.Add(Copy(s,tempi,i-tempi));
tempi:=i;
end; ShowMessage(StrList.Text);end;