wes d2a2ba9e15 first commit | %!s(int64=4) %!d(string=hai) anos | |
---|---|---|
.. | ||
README.md | %!s(int64=4) %!d(string=hai) anos | |
code.cpp | %!s(int64=4) %!d(string=hai) anos | |
unitTest.cpp | %!s(int64=4) %!d(string=hai) anos |
by Helen Yu tags: strings, regex, validation
Create a function that takes a word and returns true if the word has two consecutive identical letters. Examples double_letters("loop") ➞ true double_letters("yummy") ➞ true double_letters("orange") ➞ false double_letters("munchkin") ➞ false Notes N/A
Create a function that takes a word and returns true
if the word has two consecutive identical letters.
double_letters("loop") ➞ true
double_letters("yummy") ➞ true
double_letters("orange") ➞ false
double_letters("munchkin") ➞ false
N/A