±ÍÇÏ´Â ¼Õ´Ô À̽ʴϴÙ
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ
  
  µ¨¸¶´ç °ø½Ä ÀºÇà°èÁÂ
  ÇϳªÀºÇà 227-910235-83607
  ¿¹±ÝÁÖ ÀÌ»ó±¹(¿î¿µÁø)
ÇÁ·ÎÁ§Æ® °Ô½ÃÆÇ
ÅõÇ¥°Ô½ÃÆÇ
µ¨¸¶´ç¼Ò°³
±âÃʺÎÅÍ È°¿ë±îÁö! µ¨ÆÄÀÌ ±³À° - µ¥ºê±â¾î
°­ÁÂ, ÆÁ, Á¤º¸ °­ÁÂ, ÆÁ, Á¤º¸ ÀÔ´Ï´Ù.
±Û³»¿ë - °­ÁÂ, ÆÁ, Á¤º¸
 [angel] ¹®ÀÚ¿­ ÆĽÌ2
Ÿ¶ôõ»ç
(±è¼ºÈÆ)
2015-11-05 ¿ÀÀü 8:50:41
Ä«Å×°í¸®: ÆÁ
5631ȸ Á¶È¸



µî·ÏµÈ ÆÄÀÏÀÌ ¾ø½À´Ï´Ù.
¾È³çÇϼ¼¿ä. Å¸¶ôÀÓµÂ.

Á¦°¡ ¾²´Â ¹®ÀÚ¿­ ÆĽ̠ÇÔ¼ö ÀÔ´Ï´Ù.

function xyToken(var AList: TszString; const AText: string;
    const ASub: string = #13#10; const AutoSize: boolean = true): integer; overload;

function xyToken(const AText: string; const ASub: string = #13#10;
  const ADelim: string = #13#10): string; overload;

***** ¸ðµç µ¨ÆÄÀÌ ¹öÁ¯¿¡¼­ »ç¿ë ÇÒ ¼ö ÀÖ½À´Ï´Ù *****

ù¹ø° ÇÔ¼ö´Â Á¦°¡ Áñ°Ü¾²´Â ¹®ÀÚ¿­ ÆĽ̠ÇÔ¼ö ÀÌ°í, 
µÎ¹ø° ÇÔ¼ö´Â ÆĽ̠°á°ú¸¦ TStringList.Text À¸·Î ¹Þ±â À§ÇÑ ÇÔ¼ö ÀÔ´Ï´Ù.

¹®ÀÚ¿­ ÆĽ̠ÇÔ¼ö¸¦ ¸¸µé¾î ¾²´Â ÀÌÀ¯´Â

TStringList ÀÇ Quoted string ÆĽ̠·çƾ¿¡ ¹ö±×°¡ À־,
TStringList.CommaText := '"AB"CD", "FGHI","JK""MN"'; Çϸé

AB
CD"
FGHI
JK"MN 

°ú °°ÀÌ ¹®ÀÚ¿­ÀÌ ±úÁý´Ï´Ù.

DataSet ÀÇ Record¸¦ Quoted string À¸·Î ¹ÞÀ» ¶§ µ¥ÀÌŸ¿¡ " °¡ µé¾î ÀÖÀ¸¸é µ¥ÀÌÅÍ°¡ ±úÁö´Â °ÍÀÌ ºÒÆíÇؼ­, ¸¸µé¾î ¾²°í ÀÖ½À´Ï´Ù.

(example)
var
  MyList: TszString;
  sID, sKind, sTheDay: string;
  cMoney: currency;
begin
  ...
  xyToken(MyList, ARequest.mText);

  if Length(MyList) < 4 then
  begin
    DoSendText(AContext, RE_ErrPacket, 'ÆÐŶ ¿¡·¯');
    exit;
  end;

  sID := MyList[0];
  sTheDay := MyList[1];
  sKind := MyList[2];
  cMoney := StrToCurrDef(MyList[3], 0.0);

  if sID <> AUser.FID then
  begin
    DoSendText(AContext, RE_ErrData, 'µ¥ÀÌŸ ¿¡·¯');
    exit;
  end;
  ...


<ÇÔ¼ö ¼Ò½º>


type
  TszString = array of string;


function xyToken(var AList: TszString; const AText: string;
    const ASub: string = #13#10; const AutoSize: boolean = true): integer; overload;

function xyToken(const AText: string; const ASub: string = #13#10;
  const ADelim: string = #13#10): string; overload;


implementation


function xyToken(var AList: TszString; const AText: string; const ASub: string;
   const AutoSize: boolean): integer;
var
  nPast, nPos, nLen, nSub: integer;
begin
  integer(Result) := 0;
  nLen := Length(AText);
  nSub := Length(ASub);

  nPos := Pos(ASub, AText);
  nPast := 1;
  while nPos > 0 do
  begin
    if Result = Length(AList) then
      SetLength(AList, Result + 1024);

    if nPos = nPast then
      AList[Result] := ''
    else
      AList[Result] := Copy(AText, nPast, nPos - nPast);
    Result := Result + 1;

    nPast := nPos + nSub;
    nPos := PosEx(ASub, AText, nPast);
  end;

  if nPast <= nLen then
  begin
    if Result = Length(AList) then
      SetLength(AList, Result + 1);
    AList[Result] := Copy(AText, nPast, MaxInt);
    Result := Result + 1;
  end;

  if AutoSize then
    SetLength(AList, Result);
end;

function xyToken(const AText: string; const ASub: string = #13#10;
  const ADelim: string = #13#10): string;
var
  nPos, nPast: integer;
begin
  Result := '';
  nPast := 0;
  nPos := Pos(ASub, AText);
  whil&#