id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

test2021_12_15_APSLHL_mixer


Write a method that returns a string made up of 'str' but with 'isrt' inserted after every 'jmp' number of characters. Look at the test data for examples. As preconditions you may assume that 'str' and 'isrt' are not empty and that 'jmp' is less than the length of 'str'. Look at the test data for examples.


test2021_12_15_APSLHL_mixer("Once, twice, three times a ladle.", "<ha>", 11) → "Once, twice<ha>, three tim<ha>es a ladle.<ha>"
test2021_12_15_APSLHL_mixer("Bad puns are my specialty.", "5", 1) → "B5a5d5 5p5u5n5s5 5a5r5e5 5m5y5 5s5p5e5c5i5a5l5t5y5.5"
test2021_12_15_APSLHL_mixer("nap time", "-sleepy-", 3) → "nap-sleepy- ti-sleepy-me"

...Save, Compile, Run (ctrl-enter)

public String test2021_12_15_APSLHL_mixer(String str, String isrt, int jmp) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 230

Copyright Nick Parlante 2017 - privacy