com.google.clearsilver.jsilver.functions.string
Class FindFunction
java.lang.Object
com.google.clearsilver.jsilver.functions.NonEscapingFunction
com.google.clearsilver.jsilver.functions.string.FindFunction
- All Implemented Interfaces:
- Function
public class FindFunction
- extends NonEscapingFunction
Returns the numeric position of the substring in the string (if found), otherwise returns -1
similar to the Python string.find method.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FindFunction
public FindFunction()
execute
public Value execute(Value... args)
- Description copied from interface:
Function
- Execute a function. Should always return a result.
- Parameters:
args
- 2 string expressions (full string and substring)
- Returns:
- Position of the start of substring (or -1 if not found) as number value
Copyright © 2010-2012 Google. All Rights Reserved.