示例#1
0
int MYRTLEXP StrFindCol( CONSTSTR str,CONSTSTR seps,CONSTSTR col,int fromCol )
  {  int cn = StrColCount(str,seps);
     fromCol = (fromCol<1)?1:(fromCol);
     if (col )
       for ( int n = fromCol; n <= cn; n++ )
         if ( strcmp(StrGetCol(str,n,seps),col) == 0  ) return n;
 return -1;
}
示例#2
0
BOOL MYRTLEXP CTArgCheck( CONSTSTR name )
  {  int      cn = StrColCount(name,";"),
              n,i;
     CONSTSTR m;

    for ( n = 1; n < CT_argc && CT_argv[n]; n++ )
      if (
#if defined(__HDOS__) || defined(__HWIN__)
           (CT_argv[n][0] == '-' || CT_argv[n][0] == '/')
#else
           CT_argv[n][0] == '-'
#endif
        ) for ( i = 1; i <= cn; i++ ) {
            m = StrGetCol(name,i,";");
            if ( StrCmp(CT_argv[n]+1,m,-1,CT_CaseSensitive) == 0 ) return TRUE;
          }

 return FALSE;
}
示例#3
0
char *MYRTLEXP CTArgGet( CONSTSTR name )
  {  int         cn = StrColCount(name,";"),
                 n,i,len;
     CONSTSTR m;

    for ( n = 1; n < CT_argc && CT_argv[n]; n++ )
      if (
#if defined(__HDOS__) || defined(__HWIN__)
        (CT_argv[n][0] == '-' || CT_argv[n][0] == '/')
#else
        CT_argv[n][0] == '-'
#endif
        ) for ( i = 1; i <= cn; i++ ) {
            m = StrGetCol(name,i,";");
            if ( StrCmp(CT_argv[n]+1,m,len=strLen(m),CT_CaseSensitive) == 0 &&
           CT_argv[n][1+len] == '=') return CT_argv[n]+1+len+1;
          }
 return NULL;
}