Java String Ends With endsWithChar(final String s, final char c)

Here you can find the source of endsWithChar(final String s, final char c)

Description

ends With Char

Declaration

public static boolean endsWithChar(final String s, final char c) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean endsWithChar(final String s, final char c) {
        if (s == null || s.length() == 0) {
            return false;
        }//from  w w w  .  j  a  va2 s .c  o  m
        return s.charAt(s.length() - 1) == c;
    }
}

Related

  1. endsWithAny(String stringToMatch, String... stringToCheckEquals)
  2. endsWithAnyCI(String string, String... suffixes)
  3. endsWithAnyIC(String str, String[] needles)
  4. endsWithBackslash(final String s)
  5. endsWithChar(CharSequence s, char suffix)
  6. endsWithChar(String s, char c)
  7. endsWithChar(String string, char suffix)
  8. endsWithChar(String string, int character)
  9. endsWithContinuationMarker(String line)