Java String Ends With endsWith(StringBuffer buf, String s)

Here you can find the source of endsWith(StringBuffer buf, String s)

Description

ends With

License

Open Source License

Declaration

public static boolean endsWith(StringBuffer buf, String s) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean endsWith(StringBuffer buf, String s) {
        int iBuf = buf.length();
        int iS = s.length();

        while (--iS >= 0 && --iBuf >= 0 && buf.charAt(iBuf) == s.charAt(iS)) {
        }/* www .j a  va2  s. c  o  m*/

        return iS < 0;
    }
}

Related

  1. endsWith(String value, String[] suffixes)
  2. EndsWith(String x, String z)
  3. endsWith(String[] endsWith, String line)
  4. endsWith(String[] searchStrings, String text)
  5. endsWith(String[] searchStrings, String text)
  6. endsWith(StringBuffer buffer, String suffix)
  7. endsWith(StringBuffer in, String ending)
  8. endsWith(StringBuilder sb, String end)
  9. endsWith(StringBuilder sb, String s)