zoukankan      html  css  js  c++  java
  • 新系统班级名称规范化

    代码
    //去掉一些代码,以及全角符号
    procedure TForm1.Button1Click(Sender: TObject);
    var
      s:
    string;
      i,j,k:Integer;
    begin
     
    with qry do
      
    begin
        first;
        
    while not eof do
       
    begin
          Edit;
          s:
    =fieldbyname('bmc').AsString;
          s:
    =StringReplace(s,'','(',   [rfIgnoreCase]);
          s:
    =StringReplace(s,'',')',   [rfIgnoreCase]);
          fieldbyname(
    'bmc').AsString:=s;
          s:
    =fieldbyname('bmc').AsString;
          i:
    =Pos('10442',s);
          j:
    = Pos('(',s);
          k:
    =Pos(')',s);
          
    if i=0 then
           
    begin
            Next;
            Continue;
            
    end
          
    else
          
    begin
            s:
    =Copy(s,1,i-1);
            fieldbyname(
    'bmc').AsString:=s;
             
    if (j<>0and (k=0then
             fieldbyname(
    'bmc').AsString:= fieldbyname('bmc').AsString+')' ;
          
    end;
            Next;
        
    end;
        edit;
         Post;
        close;
        open;
      
    end;
    end;
  • 相关阅读:
    编写程序,验证string是ipV4地址
    TCP三次握手和四次挥手
    链表和数组的区别
    cookie和session的区别
    GET和POST的区别
    TCP和UDP的区别
    java HashMap和Hashtable的区别
    java 堆和栈的区别
    最小栈的实现
    关于几个位运算的算法分析
  • 原文地址:https://www.cnblogs.com/samsonleung/p/1845673.html
Copyright © 2011-2022 走看看