搜索
查看: 2101|回复: 2

如何检查一个字符串是否包含另一个字符串?

[复制链接]
发表于 2006-8-29 18:21:24 | 显示全部楼层 |阅读模式 来自 内蒙古呼伦贝尔
如何检查一个字符串是否包含另一个字符串?

有没有这样的函数?

例如:字符串str1是“english”,字符串str2是“en”。检查str1是否包含str2,包含返回true,不包换返回false。
发表于 2006-8-30 08:59:23 | 显示全部楼层 来自 黑龙江哈尔滨

回复: 如何检查一个字符串是否包含另一个字符串?

contain ( const source[], const string[] )
contain - Returns position of string found inside of source, or -1 on failure.

containi ( const source[], const string[] )
containi - Returns position of string found inside of source, or -1 on failure. Case insensitive.
回复

使用道具 举报

发表于 2006-8-30 12:33:51 | 显示全部楼层 来自 山西忻州

回复: 如何检查一个字符串是否包含另一个字符串?

kinsprite强人啊................不过DT汉化组的人就是太强...
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表