ch17l01.txt
来自「《Web编程专家指南》」· 文本 代码 · 共 21 行
TXT
21 行
Listing 17.1 Look for a specific named variable.function TForm1.CookieFromString(cookie, name : String) : String;var beginPos, endPos : integer; restOfString : String;begin {set the beginPos to the beginning of the input name value} beginPos := Pos(name,cookie) + Length(name) + 1; {+1 for '=' character} {if the search was successful} if(beginPos > (Length(name)+1)) then begin restOfString := Copy(cookie, beginPos, Length(cookie)); endPos := Pos(';',restOfString); CookieFromString := Copy(cookie, beginPos, endPos); end else CookieFromString := 'Error';end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?