Java String Ends With endsWithChar(CharSequence s, char suffix)

Here you can find the source of endsWithChar(CharSequence s, char suffix)

Description

ends With Char

License

Open Source License

Declaration

public static boolean endsWithChar(CharSequence s, char suffix) 

Method Source Code

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License");

public class Main {
    public static boolean endsWithChar(CharSequence s, char suffix) {
        return s != null && s.length() != 0 && s.charAt(s.length() - 1) == suffix;
    }/* w w w  .  j a  v a 2 s  . c om*/
}

Related

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