What's a good name for...
Name:
Anonymous
2012-06-04 11:08
A function that's like strchr or strrchr, but finds either the first or last character of a string that is NOT equal to the given character?
Name:
Anonymous
2012-06-04 21:18
ENTERPRISE QUALITY
FindFirstOrLastCharNotEqualToFactory findFirstOrLastCharNotEqualToFactory = new FindFirstOrLastCharNotEqualToFactory(aChar);
FindFirstOrLastCharNotEqualTo findFirstOrLastCharNotEqualTo = findFirstOrLastCharNotEqualToFactory.makeFindFirstOrLastCharNotEqualTo(aString);
try {
System.out.println("First not equal char: " + firstOrLastCharNotEqualTo.getFirstCharNotEqualTo());
System.out.println("Last not equal char: " + firstOrLastCharNotEqualTo.getLastCharNotEqualTo());
} catch (AllCharsEqualException e) {
System.err.println("AllCharsEqualException: All of the characters are equal.");
throw new EnterAnotherStringException(e);
}
Newer Posts