永洪社区

标题: 字符串a中是否包含字符串b [打印本页]

作者: 971125    时间: 2021-5-20 18:50
标题: 字符串a中是否包含字符串b
那个函数能在if中返回,对错,并且判断,字符串a中是否包含字符串b,比如a=123456 b=123,判断为正确    b=852,判断为错误

作者: 永洪tech-zyc    时间: 2021-5-20 18:54
contains  contains(string, substring)  如果给定字符串包含指定子字符串,则返回 true  例如:  contains("Calculation", "alcu") = true
作者: 971125    时间: 2021-5-20 19:10
永洪tech-zyc 发表于 2021-5-20 18:54
contains  contains(string, substring)  如果给定字符串包含指定子字符串,则返回 true  例如:  contains ...

里面可以是函数么contains(a, b) = true
这样?
作者: 永洪tech-zyc    时间: 2021-5-20 19:24
971125 发表于 2021-5-20 19:10
里面可以是函数么contains(a, b) = true
这样?

函数是什么意思
官网说明可以参考下 https://www.yonghongtech.com/hel ... 7%E7%AC%A6%E4%B8%B2
作者: 971125    时间: 2021-5-20 19:27
永洪tech-zyc 发表于 2021-5-20 19:24
函数是什么意思
官网说明可以参考下 https://www.yonghongtech.com/help/Z-Suite/9.2/ch/topic880.htm?zo ...

a=123456;b=123;
contains(a, b);这样可以么

作者: 永洪tech-zyc    时间: 2021-5-20 19:41
971125 发表于 2021-5-20 19:27
a=123456;b=123;
contains(a, b);这样可以么

可以的~




欢迎光临 永洪社区 (http://club.yonghongtech.com/) Powered by Discuz! X3.4