org.plovr.soy.function
Class SubstringFunction

java.lang.Object
  extended by com.google.template.soy.tofu.restricted.SoyAbstractTofuFunction
      extended by org.plovr.soy.function.SubstringFunction
All Implemented Interfaces:
SoyJsSrcFunction, SoyFunction, SoyJavaRuntimeFunction, SoyTofuFunction

public class SubstringFunction
extends SoyAbstractTofuFunction
implements SoyJsSrcFunction, SoyTofuFunction

From "Defining a Custom Function" in "Closure: The Definitive Guide"


Method Summary
 SoyData compute(List<SoyData> args)
           
 JsExpr computeForJsSrc(List<JsExpr> args)
           
 String getName()
           
 Set<Integer> getValidArgsSizes()
           
 
Methods inherited from class com.google.template.soy.tofu.restricted.SoyAbstractTofuFunction
computeForTofu
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.template.soy.tofu.restricted.SoyTofuFunction
computeForTofu
 

Method Detail

getName

public String getName()
Specified by:
getName in interface SoyFunction

getValidArgsSizes

public Set<Integer> getValidArgsSizes()
Specified by:
getValidArgsSizes in interface SoyFunction

computeForJsSrc

public JsExpr computeForJsSrc(List<JsExpr> args)
Specified by:
computeForJsSrc in interface SoyJsSrcFunction

compute

public SoyData compute(List<SoyData> args)
Specified by:
compute in interface SoyJavaRuntimeFunction