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

 

jebbert@volusia.k12.fl.us > may16_2016_SLHL_stringParse
prev  |  next  |  chance

Return a string identical to the original input parameter, but with anything between pairs of colons removed. There can be multiple pairs of colons in the string. Remove the text between the colons and also remove the colons themselves. The only exception is that a double colon "::" must result in a single colon in the resulting string. So that is like an escape code to request the inclusion of a single colon. Look at the test data for examples.


may16_2016_SLHL_stringParse("What::::::?") → "What:::?"
may16_2016_SLHL_stringParse("a::b:cdef:ghijk::lmno:pqrst:") → "a:bghijk:lmno"
may16_2016_SLHL_stringParse("") → ""

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

public String may16_2016_SLHL_stringParse(String str) { }

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: 290

Copyright Nick Parlante 2017 - privacy