about | help | code help+videos | done | prefs |
Write a method that accepts a string parameter and then returns that string with a dash "-" added between the first and second characters. As a precondition, you may assume the input parameter will have at least two character. Look at the test data for examples. test2020_10_01_APP1SLHL_splitFirst("R2-D2") → "R-2-D2" test2020_10_01_APP1SLHL_splitFirst("Dr. Who") → "D-r. Who" test2020_10_01_APP1SLHL_splitFirst("Star Trecking, across the universe...") → "S-tar Trecking, across the universe..." ...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: 240
Copyright Nick Parlante 2017 - privacy