16 THE STRING BITS PROBLEM
Given a string, return a new string made of every other char starting with the first, so "Hello" yields
"Hlo".
• for input of "Hello" ? "Hlo"
• for input of "Hi" ? "H"
• for input of "Heeololeo" ? "Hello"
17 THE COUNT LETTERS PROBLEM
Return the total number of "letter" characters (alphabetical, case insensitive) that appear in the string.
You must use the relational operators to determine if a character is a letter. You may not use the
Character classification functions.
• countLetters ("7 52") returns 0
• countLetters("abxx xc7") returns 6
• countLetters ("7 ab2 9c") returns 3
18THE STRING SPLOSION PROBLEM
Given a non-empty string like "Code" return a string like "CCoCodCode".
• for input of "Code" ? "CCoCodCode"
• for input of "abc" ? "aababc"
• for input of "ab" ? "aab"
19 THE STRING X PROBLEM
Given a string, return a version where all the "x" have been removed. Except an "x" at the very start or
end should not be removed.
• for input of "xxHxix" ? "xHix"
• for input of "abxxxcd" ? "abcd"
• for input of "xabxxxcdx" ? "xabcdx"
20THE GOOD NUMBERS PROBLEM
Given a String, return a new String containing only the digit characters from the String. You must use
the relational operators to determine if a character is a digit; you cannot use the Character classification
methods.
• goodNumbers ("ab1c235") returns "1235"
• goodNumbers ("$2,12.50") returns "1250"
• goodNumbers ("Heeololeo") returns ""