如何在某字串中取出指定的值(子字串) |
答題得分者是:william
|
delphi
初階會員 發表:52 回覆:64 積分:38 註冊:2002-05-21 發送簡訊給我 |
|
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
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 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |