유돌이

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Notice

2008. 12. 29. 23:27 델파이
function NextToken(var s:string; Separator:char):string;
var
  Sep_Pos : byte;
begin
  Result := '';
  if length(s)>0 then begin
   Sep_Pos := pos(Separator, s);
   if Sep_Pos >0 then begin
    Result := copy(s, 1, Pred(Sep_Pos));
    Delete(s,1,Sep_Pos);
   end
   else begin
     Result := s;
     s := '';
   end;
  end;
end;

// 예제
while length(TheString) > 0 do
begin
  NextParam := NextToken(TheString, ',');
  // etc..
end;

'델파이' 카테고리의 다른 글

HTTP CONNECTION  (0) 2008.12.29
문자열 역순으로 출력하기  (0) 2008.12.29
OleVariant 형을 스트링으로 변환하는 방법  (0) 2008.12.29
쿠키 읽고/쓰기(GetCookie, SetCookie)  (0) 2008.12.29
파일 찾기  (0) 2008.12.24
posted by 유돌이