package cl.jtv;
/*
 * Utils.java
 *
 * Created on 3 de marzo de 2003, 02:18 AM
 */

/**
 *
 * @author  Administrador
 * @version 
 */
import java.io.*;


public class Utils {

    public final static String jtv = "jtv";
    public final static String JTV = "JTV";
    public final static String tex = "tex";
    public final static String TEX = "TEX";
    public final static String soc = "soc";
    public final static String SOC = "SOC";
    
    /*
     * Get the extension of a file.
     */  
    public static String getExtension(File f) {
        String ext = null;
        String s = f.getName();
        int i = s.lastIndexOf('.');

        if (i > 0 &&  i < s.length() - 1) {
            ext = s.substring(i+1).toLowerCase();
        }
        return ext;
    }
    
    public static String escapeBlank(String simbolo){
        
        return (simbolo.equals("#")&&cl.jtv.JTV.flagLatex?"\\":"")+simbolo;
        
    }
}


