- Ensure each of the test cases in the class BasicStringUtilsTest successfully passes upon completion of each of the method stubs in the class BasicStringUtils.
String camelCase(String)
String reverse(String)
String reverseThenCamelCase(String)
String removeFirstAndLastCharacter(String)
String invertCasing(String)
- Description
- Given a string,
str
, return an identical String with the first character capitalized.
- Given a string,
-
Sample Script
// : Given String input = "jumping jacks"; // : When String outcome = BasicStringUtils.camelCase(input); // : Then System.out.println(outcome);
-
Sample Output
Jumping jacks
- Description
- Given a string array
str
, return a string with identical contents, in the reverse order
- Given a string array
-
Sample Script
// : Given String input = "Leon"; // : When String outcome = BasicStringUtils.reverse(input); // : Then System.out.println(outcome);
-
Sample Output
noeL
- Description
- Given a string,
str
, return a string with identical contents, in reverse order, with first character capitalized
- Given a string,
-
Sample Script
// : Given String input = "Leon"; // : When String outcome = BasicStringUtils.reverseThenCamelCase(input); // : Then System.out.println(outcome);
-
Sample Output
NoeL
- Description
- Given a string,
str
, return a string with identical contents excluding first and last character.
- Given a string,
-
Sample Script
// : Given String input = "Jack Jumpz; // : When String outcome = BasicStringUtils.removeFirstAndLastCharacter(input); // : Then System.out.println(outcome);
-
Sample Output
ack jump