001 /** 002 * Implements the CFML Function asc 003 */ 004 package railo.runtime.functions.string; 005 006 import railo.runtime.PageContext; 007 import railo.runtime.ext.function.Function; 008 009 public final class Asc implements Function { 010 public static double call(PageContext pc , String string) { 011 if(string.length()==0)return 0; 012 return string.toCharArray()[0]; 013 } 014 }