Strings { @Deprecated public static boolean endsWith(final CharSequence qc, final CharSequence with) { return CharSequences.endsWith(qc, with); } private  Strings(); @Deprecated static int distance(@Nonnull final String s1, @Nonnull final String s2); @Nullable static String unescape(@Nullable final String what); static boolean contains(final String string, final char... chars); @Deprecated static boolean contains(final CharSequence string, final char... chars); static String withFirstCharLower(final String str); static void writeReplaceWhitespaces(final String str, final char replacement, final Appendable writer); static char[] steal(final String str); static String wrap(final char[] chars); static CharsetEncoder createUtf8Encoder(); static CharsetDecoder createUtf8Decoder(); static CharsetEncoder getUTF8CharsetEncoder(); static CharsetDecoder getUTF8CharsetDecoder(); @SuppressFBWarnings("SUA_SUSPICIOUS_UNINITIALIZED_ARRAY") static byte[] encode(final CharsetEncoder ce, final char[] ca, final int off, final int len); static int getmaxNrBytes(final CharsetEncoder ce, final int nrChars); static int encode(final CharsetEncoder ce, final char[] ca, final int off, final int len,
          final byte[] targetArray); @SuppressFBWarnings("SUA_SUSPICIOUS_UNINITIALIZED_ARRAY") static String decode(final CharsetDecoder cd, final byte[] ba, final int off, final int len); static String fromUtf8(final byte[] bytes); static String fromUtf8(final byte[] bytes, final int startIdx, final int length); static byte[] toUtf8(final String str); @Deprecated static int compareTo(@Nonnull final CharSequence s, @Nonnull final CharSequence t); @Deprecated static boolean equals(@Nonnull final CharSequence s, @Nonnull final CharSequence t); @Deprecated static int hashcode(final CharSequence cs); @Deprecated static CharSequence subSequence(final CharSequence seq, final int startIdx, final int endIdx); @Deprecated static boolean endsWith(final CharSequence qc, final CharSequence with); @Deprecated static void escapeJsonString(@Nonnull final String toEscape, final StringBuilder jsonString); @Deprecated static void escapeJsonString(@Nonnull final String toEscape, final Appendable jsonString); @Deprecated static void appendJsonStringEscapedChar(final char c, final StringBuilder jsonString); @Deprecated static void appendJsonStringEscapedChar(final char c, final Appendable jsonString); @Deprecated static void appendUnsignedString(final StringBuilder sb, final long nr, final int shift); @Deprecated static void appendUnsignedString(final StringBuilder sb, final int nr, final int shift); @Deprecated static void appendUnsignedStringPadded(final StringBuilder sb, final int nr, final int shift,
          final int padTo); @Deprecated static void appendUnsignedStringPadded(final Appendable sb, final int nr, final int shift,
          final int padTo); @Deprecated static void appendSpaces(final Appendable to, final int nrSpaces); @Deprecated static void appendSpaces(final StringBuilder to, final int nrSpaces); @Deprecated static boolean regionMatches(final CharSequence t, final int toffset,
          final CharSequence other, final int ooffset, final int plen); static String truncate(@Nonnull final String value, final int length); @Nonnull static String commonPrefix(@Nonnull final CharSequence... strs); static final String EOL; }
@Test public void testEndsWith() { Assert.assertTrue(Strings.endsWith("dfjkshfks", "hfks")); Assert.assertTrue(Strings.endsWith("dfjkshfks", "")); Assert.assertFalse(Strings.endsWith("dfjkshfks", "hfk")); Assert.assertTrue(Strings.endsWith("dfjkshfks", "dfjkshfks")); Assert.assertFalse(Strings.endsWith("dfjkshfks", "dfjkshfksu")); }