about | help | code help+videos | done | prefs |
replaceLastString
Write a method called replaceLastString, which is given three Strings as input parameters. The method should return the first String which was passed to the method with the last occurrence of the second String replaced in the first String with the third String. For example replaceLastString("Mississippi", "iss", "3") would return "Miss3ippi" and replaceLastString("banana", "a", "0") would return "banan0". replaceLastString("Mississippi", "iss", "3") → "Miss3ippi" replaceLastString("Honolulu", "o", "O") → "HonOlulu" replaceLastString("banana", "a", "ii") → "bananii" ...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: 200
Copyright Nick Parlante 2017 - privacy