about | help | code help+videos | done | prefs |
countPatternInString
Write a method which is given two Strings as input parameters. The method should return the count of how many times the second String is contained in the first String passed to the method. For example countPatternInString("banana","ana") should return 2. countPatternInString("Mississippi", "iss") → 2 countPatternInString("banana", "ana") → 2 countPatternInString("Marlboro Mustangs", "Ma") → 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
Copyright Nick Parlante 2017 - privacy