Java String Suffix suffix(String fname)

Here you can find the source of suffix(String fname)

Description

suffix

License

Open Source License

Declaration

public static String suffix(String fname) 

Method Source Code

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

public class Main {
    public static String suffix(String fname) {
        int index = fname.lastIndexOf('.');
        if (index < 0) {
            return "";
        }//from   w w  w.  ja v  a2 s  . c  o m
        return fname.substring(index + 1).toLowerCase();
    }
}

Related

  1. suffix(final String source, final String target)
  2. suffix(String input, char delimiter)
  3. suffix(String mime)
  4. suffix(String name, char separator)
  5. suffix(String name, String suffix)