以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- trim 语法求助 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=83138) |
-- 作者:ljh29206 -- 发布时间:2016/4/1 12:02:00 -- trim 语法求助 Dim namess As String = "aa,nm,s,fd,t,fg" Dim namecondition As String If namess > "" Then Dim names As String() names= namess.Split(",") For Index As Integer = 0 To names.Length - 1 namecondition = " name = \'" & names(Index) & "\' or " & namecondition Next namecondition = namecondition.Trim("or ") namec & namecondition & ") " End If Output.Show(namecondition) 最后边的 “or ” 去不丢 帮忙看下哪里错了
|
-- 作者:大红袍 -- 发布时间:2016/4/1 12:28:00 -- trim只能去掉单字符。
namecondition = namecondition.SubString(0, namecondition.length - 3) |