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

 

tim@ggc.edu > getRidOfDashes
prev  |  next  |  chance

Write a method that returns the string that is surrounded by dashes. ( The input string is guaranteed to be dashes, following a string, then more dashes)


getRidOfDashes("----heh----") → "heh"
getRidOfDashes("-----whew------") → "whew"
getRidOfDashes("--nanananana-----") → "nanananana"

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

public String getRidOfDashes( 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: 100

Copyright Nick Parlante 2017 - privacy