001 /** 002 * Implements the CFML Function lsiscurrency 003 */ 004 package railo.runtime.functions.international; 005 006 import railo.runtime.PageContext; 007 import railo.runtime.ext.function.Function; 008 import railo.runtime.i18n.LocaleFactory; 009 010 public final class LSIsCurrency implements Function { 011 012 private static final long serialVersionUID = -8659567712610988769L; 013 014 public static boolean call(PageContext pc , String string) { 015 try { 016 LSParseCurrency.toDoubleValue(pc.getLocale(),string,true); 017 return true; 018 } catch (Throwable t) { 019 return false; 020 } 021 } 022 public static boolean call(PageContext pc , String string,String strLocale) { 023 try { 024 LSParseCurrency.toDoubleValue(LocaleFactory.getLocale(strLocale),string,false); 025 return true; 026 } catch (Throwable t) { 027 return false; 028 } 029 } 030 }