1樓:網友
看看跟你的情況一樣。
asp 兩個字串比較 留下不同的
2樓:網友
<%ww="1|2|3|4|5|6|7|8|"
bb="2|4|7|8|"
mylist=split(bb,"|")
ss=wwfor i = lbound(mylist) to ubound(mylist)
ss=replace(ss,mylist(i),"")ss=replace(ss,"||","|")next
錯誤出在,你每次都對ww進行了替換。
asp中如何比較兩個字串
3樓:網友
dim arra(),n:n=0
str1="a:123,b:1234,c12,d1234,e562"
str2="a:123,b:124,c12,d124,e562"
arr1=split(str1,",")
arr2=split(str2,",")
for i=0 to ubound(arr1)if arr1(i)<>arr2(i) thenredim preserve arra(n+2)arra(n)=arr1(i)
arra(n+1)=arr2(i)
n=n+2end if
next輸出結果。
直接打的,沒經過測試,如果有問題再找我。
4樓:網友
1 先裝入陣列。
2 遍歷陣列進行比較。
asp 資料庫中的特殊字元讀取後為?號
5樓:網友
按照utf-8編碼取出記錄,顯示到同樣編碼的頁面上。
asp中怎麼比對兩個字串是否相同
6樓:網海1書生
<%mystr1 = "abcd"
mystr2 = "abcd"
mycomp = strcomp(mystr1,mystr2,1)if mycomp=0 then
一樣"else
不一樣"end if
也可以直接比較:
mystr1 = "abcd"
mystr2 = "abcd"
if mystr1 = mystr2 then"一樣"
else不一樣"
end if
asp中判斷兩個字串是否相等
7樓:網友
rs("passed")是字串型別就應該這樣寫。
if rs("passed")="yes" then%>
8樓:網友
rs("passed")="yes"或者rs("passed")=="yes"
你試試,我不懂vbs,但指令碼程式應該都差不多。
9樓:網友
比較就是獲取兩個字元竄進行比較啊,用equeal()方法或者==啊。
asp怎麼迴圈讀取兩個資料庫的記錄
10樓:網友
樓主可以用一句連線查詢,把兩個表的資料合一起。
迴圈查詢的話效率明顯會很低。
在C中兩個字串合併及輸出,C 裡,合併字串
繼承cstrone public class cstrtwo cstrone private string m str2 string.empty public cstrtwo string str,string str2 base str this.m str2 str2 public void ...
excel中提取某兩個字元中間字串的函式
public function mysubstr scord as string dim stanum as integer dim scolen as integer stanum instr 1,scord,1 1 scolen instrrev scord,1,1 stanum mysubst...
從鍵盤輸入兩個字串s1和s2,將字串s1和s2連線成字串,送入字元陣列s
include include main char str 1 500 str 2 500 int i,j printf input a string s1 n gets str 1 printf input a string s2 n gets str 2 for i 0 str 1 i 0 i ...