線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1576
推到 Plurk!
推到 Facebook!

如何在某字串中取出指定的值(子字串)

答題得分者是:william
delphi
初階會員


發表:52
回覆:64
積分:38
註冊:2002-05-21

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-01-09 14:21:25 IP:61.63.xxx.xxx 未訂閱
請教個位大大: 我要從asp的回傳值取值.但因為資料很多而且不同(我自己有在asp上定義)我ㄉdelphi是抽這中間ㄉ字串但有些質會抽錯.照成資料會重覆我想用 posㄉ函式但不會用請教那位大大可以教我....謝謝 shermen^_^ ==原主題『取值』不妥,delphi下一次記得取個有意義的主題名稱 == 發表人 - ddy 於 2003/01/10 01:30:51
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-01-09 14:47:39 IP:147.8.xxx.xxx 未訂閱
Extracted from Delphi help: Returns the index value of the first character in a specified substring that occurs in a given string. Unit System Category string handling routines Delphi syntax: function Pos(Substr: string; S: string): Integer; Description In Delphi, Pos searches for a substring, Substr, in a string, S. Substr and S are string-type expressions. Pos searches for Substr within S and returns an integer value that is the index of the first character of Substr within S. Pos is case-sensitive. If Substr is not found, Pos returns zero. The PosEx function is similar to Pos, but provides additional features and can be used in C code. e.g. var s : string; s := '123456789'; Pos('1',s)=1 Pos('2',s)=2 ... Pos('9',s)=9 Pos('x',s)=0
delphi
初階會員


發表:52
回覆:64
積分:38
註冊:2002-05-21

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-01-09 14:55:35 IP:61.63.xxx.xxx 未訂閱
謝謝我已經解決ㄌ 跟你用ㄉ方式差不多,還是謝謝你 shermen^o^
系統時間:2024-04-24 13:43:13
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!