/** * @deprecated Use the CharSequence version * @see #previous(CharSequence) */ @Deprecated public static String previous(String self) { return previous((CharSequence) self); }
@Deprecated public static CharSequence previous(CharSequence self) { return StringGroovyMethods.previous(self); }
@Deprecated public static String previous(String self) { return StringGroovyMethods.previous(self); }
public void testDecrementString() throws Exception { String original = "a"; String answer = StringGroovyMethods.previous(original); assertEquals("`", answer); assertTrue(ScriptBytecodeAdapter.compareLessThan(answer, original)); }