about | help | code help+videos | done | prefs |
Write a method that accepts two string input parameters, 'str' and 'mask'. The parameter 'mask' will be at least as long as the parameter 'str'. Return a new string constructed from 'str' using the characters in 'str' that are in the same location as any '#' character in the parameter 'mask'. Look at the test data for examples. dec18_2015_APSLHL_stringMask("abcdefghijklmn", "#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#") → "acegikm" dec18_2015_APSLHL_stringMask("Star Wars", "_###_xyz##") → "tars" dec18_2015_APSLHL_stringMask("", "###########") → "" ...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: 290
Copyright Nick Parlante 2017 - privacy