加入收藏 | 设为首页 | 会员中心 | 我要投稿 北几岛 (https://www.beijidao.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

CString/string/char *比较详解(2)

发布时间:2021-05-20 14:29:26 所属栏目:大数据 来源: https://blog.csdn.net/dragonf
导读:? ( 四) 常用算法 a) ?????? 查找 作用 char* string CString 查找指定值 strchr strstr strrstr strspn find Find 第一个匹配的值 fild_first_of FindOneOf 从后面开始查找 ReserveFind 指定匹配方式 find_if 注:find_if中是把范围内的值挨个代入匹配函数
(四) 常用算法a)?????? 查找

作用char*stringCString查找指定值strchrstrstrstrrstrstrspnfindFind第一个匹配的值fild_first_ofFindOneOf从后面开始查找ReserveFind指定匹配方式find_if

注:find_if中是把范围内的值挨个代入匹配函数直至返回trueb)????? 比较

作用char*stringCString查找指定值(区分大小写)strcmpstrncmpstrcoll_strncolloperator<operator>operator<= operator>=operator==operator!=CollateCompare查找指定值(不区分大小写)_stricmp_strnicmp_stricoll_strnicollCollateNoCaseCompareNoCase

注:返回值如果<0则前面的值小于后面的值,反之亦然c)????? 替换

作用char*stringCString查找指定值_strset_strnsetreplacereplace_copyreplace_copy_ifreplace_ifReplace

d)????? 插入

作用char*stringCString查找指定值insertInsert

e)?????? 增加

作用char*stringCString动态增加值strcatpushappendAppendAppendCharAppendFormat

(编辑:北几岛)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

?
    推荐文章
      热点阅读