| about | help | done | prefs | create account |
Java > String-3 > sameEnds
prev | next | chance
| Given a string, return the longest substring that appears at both the beginning and end of the string without overlapping. For example, sameEnds("abXab") is "ab".
sameEnds("abXYab") → "ab" sameEnds("xx") → "x" sameEnds("xxx") → "x" ...Save, Compile, Run See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops |
Forget It! -- delete my code for this problem 321.0
Copyright Nick Parlante 2006-10 - privacy