Java String Suffix suffix(String string, final String suffix)

Here you can find the source of suffix(String string, final String suffix)

Description

suffix

License

Open Source License

Declaration

public static String suffix(String string, final String suffix) 

Method Source Code

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

public class Main {
    public static String suffix(String string, final String suffix) {
        if (!string.endsWith(suffix)) {
            string += suffix;//  ww  w  . ja  v a  2  s . co m
        }
        return string;
    }
}

Related

  1. suffix(String prefix, String path)
  2. suffix(String s, int delim)
  3. suffix(String s, String suffix)
  4. suffix(String str, int width, String with)
  5. suffix(String str, String suf)
  6. suffix(String value, String prefix)
  7. suffix(String[] columns, String suffix)
  8. suffixClassName(String tableName)
  9. suffixes(char[] x, int[] suff)