The code copy is as follows:
<%
'Function: Complete another string before and after one string
'Source: http://jorkin.reallydo.com/article.asp?id=452
PublicFunctionFill(ByValsString,ByValsStr)
Fill=RFill(LFill(sString,sStr),sStr)
EndFunction
%>
The code copy is as follows:
<%
'Function: Complete another string in front of one string
'Source: http://jorkin.reallydo.com/article.asp?id=452
PublicFunctionLFill(ByValsString,ByValsStr)
DimiStrLen:iStrLen=Len(sStr&"")
Fori=iStrLenTo1Step-1
IfRight(sStr,i)=Left(sString,i)ThenExitFor
Next
LFill=Left(sStr,iStrLen-i)&sString
EndFunction
%>
The code copy is as follows:
<%
'Function: Complete another string after one string
PublicFunctionRFill(ByValsString,ByValsStr)
DimiStrLen:iStrLen=Len(sStr&"")
Fori=iStrLenTo1Step-1
IfLeft(sStr,i)=Right(sString,i)ThenExitFor
Next
RFill=sString&Mid(sStr,i+1)
EndFunction
%>
For example:
<%=RFill(LFill("www.Vevb.com/article.asp","http://"),"article.asp?id=452")%>