zoukankan      html  css  js  c++  java
  • string::find()关键字符串定位

     语法: 

    1 1.size_type source_str.find( const basic_string &str, size_type index );
    2 2.size_type  source_str.find( const char *str, size_type index );
    3 3.size_type  source_str.find( const char *str, size_type index, size_type length );
    4 4.size_type  source_str.find( char ch, size_type index );

    1、2.返回str在字符串source_str中第一次出现的位置(从index开始查找)。如果没找到则返回string::npos,

    3.返回str在字符串source_str中第一次出现的位置(从index开始查找,长度为length)。如果没找到就返回string::npos,

    4.返回字符ch在字符串source_str中第一次出现的位置(从index开始查找)。如果没找到就返回string::npos

  • 相关阅读:
    Java 常见异常种类
    Oracle存储过程记录异常
    oracle定时器
    oracle生成单据号
    oracle计算时间秒数差
    oracle分组后取每组第一条数据
    was部分更新
    数据库分区
    JTA事务管理
    docker
  • 原文地址:https://www.cnblogs.com/kevinGaoblog/p/2461510.html
Copyright © 2011-2022 走看看