zoukankan      html  css  js  c++  java
  • 类似于Split(VB)的函数

    procedure ParseStrToStrings(AStrings:TStrings;S:String;iType:integer;seperator:string);

    var

    i:integer;

    begin

    if (iType<0) or (iType>5) then

    Exit;

    if iType=4 then

    begin

    AStrings.CommaText :=s;

    Exit;

    end;

    case iType of

    0: Seperator :=',';

    1: Seperator :=';';

    2: Seperator :=' ';

    3: Seperator :=chr(VK_TAB);

    end;

    i:=pos(seperator,s);

    while i>0 then

    begin

    AStrings.Add(Copy(s,0,i-1));

    s :=copy(s,i+length(seperator),length(s));

    i :=pos(seperator,s);

    end;

    if s<>' ' then

    AStrings.Add(s)

    end;

  • 相关阅读:
    深入理解多态..............................
    走过路过 不要错过..
    进军C#..
    员工打卡....
    MySQL
    MySQL
    MySQL
    MySQL
    MySQL
    MySQL
  • 原文地址:https://www.cnblogs.com/djcsch2001/p/2035834.html
Copyright © 2011-2022 走看看