Java String Ends With endsWithSpace(String s)

Here you can find the source of endsWithSpace(String s)

Description

ends With Space

License

Open Source License

Declaration

public static boolean endsWithSpace(String s) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static boolean endsWithSpace(String s) {
        if (s != null && s.length() > 0) {
            char last = s.charAt(s.length() - 1);
            if (last == ' ')
                return true;
        }// w  w w  .  ja  v a2  s. c o  m
        return false;
    }
}

Related

  1. endsWithSentenceSeparator(char[] token)
  2. endsWithSeparator(String str)
  3. endsWithSingleQuoteS(String s)
  4. endsWithSlash(final String path)
  5. endsWithSomeChar(char cs[], String activationToken)
  6. endsWithSpaces(final String text)
  7. endsWithStarsPattern(String text, int from)
  8. endsWithStartOfOther(String text, String textOther)
  9. endsWithStop(String str)