怎么判断字符串是否在指定的字符集中

漠叔 2017-04-10 05:03:09
比如A="a,b,c,d,e,f,g"
B="fcde"
怎么判断B中的字符都是A中有的?
...全文
113 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Go 旅城通票 2017-04-10
  • 打赏
  • 举报
回复
A="a,b,c,d,e,f,g"
B="fcde"
function strcontain(a,b)
  for i=1 to len(b)
    if instr(a,mid(b,i,1))=0 then
      strcontain=false:exit function
    end if
  next
  strcontain=true
end function

allcontain=strcontain(a,b)
msgbox allcontain
allcontain=strcontain(a,"fhij")
msgbox allcontain

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧