about | help | code help+videos | done | prefs |
splitA(string, delimiter): EXTRA-CREDIT This works EXACTLY like the split() function in Javascript! Given a string and a delimiter, split the string into an array of Strings. The delimiter marks the boundaries where you will divide the string. For example, split("first=John&last=Smith","&") will return an array of Strings with two members: {"first=John","last=Smith"). NOTE: You may NOT use the built-in "split()" method that Java provides. HINT: Click on the "help" link, then on "Strings". Search for "findOOP". RUBRIC: It is not enough to just solve the problem. Make sure you use PROPER INDENTATION. You MUST use CURLY BRACKETS for all loops and if/else statements. Also, the more EFFICIENT your solution, the higher your grade. If you have extraneous (superfluous / unnecessary) code, deductions will be taken. splitA("first=John&last=Smith", "&") → ["first=John", "last=Smith"] splitA("Joanie Mitchell*Barack Obama*Bob Dylan", "*") → ["Joanie Mitchell", "Barack Obama", "Bob Dylan"] splitA("abc123def123ghi123jkl123mno123pqr123stu123vwx123yz", "123") → ["abc", "def", "ghi", "jkl", "mno", "pqr", "stu", "vwx", "yz"] ...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: 20
Copyright Nick Parlante 2017 - privacy