跳转至

0028 Find the Index of the First Occurrence In a String

  • Simple
  • C++

问题概述

解题思路

class Solution
{
public:
    int strStr(std::string haystack, std::string needle)
    {
        return (int)haystack.find(needle);
    }
};