
StringIndexOf |
ptolemy.actor.lib.string.StringIndexOf |
Output the index of a searchFor string contained in a given
inText. The search begins at the index given by
startIndex and ends at either the end or the beginning of the
string, depending on whether searchForwards is true or false,
respectively. If the string is not found, then the output is -1. If
the string is found, then the output is the index of the start of the
string, where index 0 refers to the first character in the string.
Author(s): Rakesh Reddy, Philip Baldwin, Edward A. Lee
Version:$Id: StringIndexOf.java,v 1.16 2005/07/08 19:56:37 cxh Exp $
Pt.Proposed Rating:Green (pjb2e)
Pt.Accepted Rating:Green (eal)
output
Output producing the index of the searchFor string, if
it is found, and -1 otherwise. This has type int.
ignoreCase
The parameter to state whether to ignore case. This is a
boolean that defaults to false.
inText
Port and parameter specifying the string that will be searched.
This has type string and defaults to the empty string.
searchFor
Port and parameter specifying a string to find in
the inText string. This has type string and
defaults to an empty string.
searchForwards
Boolean parameter indicating the direction in which to search.
This is true to find the first occurrence and false to find the last.
The default value is true.
startIndex
Port and parameter that determines where to start the search.
This has type int and defaults to 0.