zoukankan      html  css  js  c++  java
  • Functions

    CheckFolderChar(folderName)

    StrDelete(Str,delStr)

    代码
    //Jimmy Jun 14th 2010
    static str StrDelete(str Sx,str Ds) //Sx = string Ds = delstr
    {
    int St,Fl,i=0,j;
    ;
    Fl
    = StrLen(Sx);
    St
    = strScan(Sx,Ds,1,Fl);
    j
    = StrLen(Ds);
    if (St>=1)
    {
    Sx
    = strdel(Sx,St,j);
    Fl
    = strlen(Sx);
    while (i<=10)
    {
    St
    = strScan(Sx,Ds,1,Fl);
    if (St>=1)
    {
    Sx
    = strdel(Sx,St,j);
    Fl
    = strlen(Sx);
    }
    i
    =i+1;
    }
    }
    return Sx;
    }

    代码
    /**
    Jimmy- Jun 14th 2010
    intercompany item picture handling
    check special characters in a subfolder name
    remove \ / : * ? " < > |
    */
    static Str checkFolderChar(Str pFolderName)
    {
    Str mReturn
    = "";
    Int mLoop;
    ;

    for (mLoop=1; mLoop<=StrLen(pFolderName); mLoop++)
    {
    if ((substr(pFolderName, mLoop, 1) != "\\")
    && (substr(pFolderName, mLoop, 1) != "/")
    && (substr(pFolderName, mLoop, 1) != ":")
    && (substr(pFolderName, mLoop, 1) != "*")
    && (substr(pFolderName, mLoop, 1) != "?")
    && (substr(pFolderName, mLoop, 1) != '"')
    && (substr(pFolderName, mLoop, 1) != "<")
    && (substr(pFolderName, mLoop, 1) != ">")
    && (substr(pFolderName, mLoop, 1) != "|"))
    {
    mReturn
    = mReturn + substr(pFolderName, mLoop, 1);
    }
    }

    return mReturn;
    }
  • 相关阅读:
    mysql事务
    python zip dict函数
    有关mysql索引
    hash(散列函数)
    Docker使用
    Mac终端命令自动补全
    python序列化与反序列化(json与pickle)
    python txt、excel读写
    python 正则表达式
    python进行数据预处理-pandas
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1758100.html
Copyright © 2011-2022 走看看