 |
cgjj
總版主

註冊日期: Oct 2003
來 自:
文章數量: 18091 |
回覆: 字符串公式請教
引用: 最初由 ruhong0927 發表
若某字串為"AA,BB,CC,DD",我能否寫成將逗點變成換行符號.
即原先顯示 AA,BB,CC,DD
變成
AA
BB
CC
DD
將原來的 AA,BB,CC,DD
改為 AA\nBB\nCC\nDD 即可
範例如下:
原碼:
SLIST:='AA,BB,CC,DD';
ALIST:=''; SPos1:=1;
while 1 do begin
SPos2:=STRFIND(SLIST,',',SPos1);
if SPos2=0 then break;
ALIST:=ALIST+STRMID(SLIST,SPos1,SPos2-SPos1)+'\n';
SPos1:=SPos2+1;
end;
ALIST:=ALIST+strmid(SLIST,SPos1,0);
EXPLAIN(1,ALIST);
|
|
向版主報告此篇 |  |
|
2010-05-17 18:09 |
|
|
|  |
本站所有內容未經作者授權禁止轉貼節錄, 發表言論僅供參考勿作為投資決策依據。瀏覽本站請使用 IE 5.5 以上版本, 最佳瀏覽解析度 1024 x 768 全彩。
|
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved. 聯絡我們
|