[Dart] LeetCode 28. Find the Index of the First Occurrence in a String
1. 문제 https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/description/?envType=study-plan-v2&envId=top-interview-150 2. 요구사항1) 두 개의 문자열 haystack과 needle이 주어진다.2) haystack에서 needle과 같은 문자열이 있는 경우에 처음 나타나는 인덱스를 반환한다.3) 만약 일치하는 문자열이 없는 경우에는 -1을 반환한다. 3. 핵심 아이디어1) substring으로 문자열 나누기 haystack을 needle과 비교하기 위해서 needle과 같은 문자열로 나눈 후, 비교해야 합니다. str.substring(i, j)는 str 문..