about | help | code help+videos | done | prefs |
Given two String inputs, return the position of the first five characters of the first String within the second String, or -1 if the first five characters of the first String do not occur within the second String. Note that some of the input Strings will have less than five characters, return -1 if that happens. HINT This method requires the use of the length(), substring() and indexOf() methods of Strings.apcsaStringsFirstFiveSearch("abcdefg", "abcde Blah blah") → 0 apcsaStringsFirstFiveSearch("abcdefg", "Blah blah abcde") → 10 apcsaStringsFirstFiveSearch("abc", "abc") → -1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 150
Copyright Nick Parlante 2017 - privacy