splittotable.inc

来自「一个软件工程的软件质量web跟踪管理系统」· INC 代码 · 共 69 行

INC
69
字号
<%
Function SplitToTable(strInput)
  intDBFIELD=250     
  strA=strInput
  CELen=0
  strFormatDetail0=" "
  strFormatDetail1=" "
  strFormatDetail2=" "
  for i=1 to len(strA)
    strONE=Mid(strA,i,1) 
    if Asc(strONE)>0 then
      CELen=CELen+1
      if CELen=intDBFIELD then
	 strSPLIT=strSPLIT & strONE
	 if strFormatDetail0=" " then
	    strFormatDetail0=strSPLIT
	 elseif strFormatDetail1=" " then
	    strFormatDetail1=strSPLIT
	 else
	    strFormatDetail2=strSPLIT
	 end if
	 strSPLIT=""
	 CELen=0
      else 
	    strSPLIT=strSPLIT & strONE             
      end if
    else
      CELen=CELen+2
      if CELen=intDBFIELD then 
        strSPLIT=strSPLIT & strONE
	 if strFormatDetail0=" " then
	    strFormatDetail0=strSPLIT
	 elseif strFormatDetail1=" " then
	    strFormatDetail1=strSPLIT
	 else
	    strFormatDetail2=strSPLIT
	 end if
 	strSPLIT=""
	CELen=0
      else
	if CELen=intDBFIELD+1 then
	 if strFormatDetail0=" " then
	    strFormatDetail0=strSPLIT
	 elseif strFormatDetail1=" " then
	    strFormatDetail1=strSPLIT
	 else
	    strFormatDetail2=strSPLIT
	 end if
	  strSPLIT=""
	  strSPLIT=strONE
          CELen=2
        else
	  strSPLIT=strSPLIT & strONE
        end if
     end if 	  
    end if
  Next  
  if CELen<>0 then
	 if strFormatDetail0=" " then
	    strFormatDetail0=strSPLIT
	 elseif strFormatDetail1=" " then
	    strFormatDetail1=strSPLIT
	 else
	    strFormatDetail2=strSPLIT
	 end if      
  end if 
  SplitToTable=strFormatDetail0 & "!!!!" & strFormatDetail1 & "!!!!" & strFormatDetail2
End Function 
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?