Given a string, return true if "bad" appears starting at index 0 or 1 in the string, such as with "badxxx" or "xbadxx" but not "xxbadxx"....
Search Results
Searching for: substring
Individual Exercises
0
/ 30
0
/ 30
Given an out string of length 4, such as "<<>>", and a word, return a new string where the word is in the middle of the out...
0
/ 30
Given a string, return the string made of its first two chars, so the string "Hello" yields "He". If the string is shorter than length 2,...
0
/ 30
[Based on an exercise at https://codeworkout.cs.vt.edu/]
Given a string, return the string made of its first two chars, so the string...
0
/ 10
Description
Complete the method below for evaluating the substring of any string. If the given string is empty, return "Empty". If the...
0
/ 10
What will be the output of the following code?
public class Answer { System.out.println("Hello World!".substring(6)); }
0
/ 15
[Based on an exercise at https://codeworkout.cs.vt.edu/]
Write a function in Java that implements the following logic: Given a string,...