Lasso Soft Inc. > Home

[String->Find]

[String->Find] returns the position at which the first parameter is found within the string or 0 if the first parameter is not found within the string. Requires a single string parameter. The pattern is not case sensitive.

Optional parameters allow a portion of the string to be searched by specifying the offset at which to start searching and the number of characters from the offset to search.

Optional parameters allow a portion of the pattern to be used as the search pattern by specifying the offset into the pattern and the number of characters from the pattern to search for.

  • Syntax
  • Parameters
[String Variable->(Find: 'String Value')]

[String Variable->(Find: 'String Value', OffsetLength)]

[String Variable->(Find: 'String Value', OffsetLengthPattern OffsetPattern Length)]
Required Parameters
String Value The string which is to be examined.
First The pattern which should be searched for in the string.
Fourth The offset into the pattern for which to search. Defaults to the start of the pattern.
Fifth The length from the offset in the pattern for which to search. If omitted, defaults to searching for the entire pattern from the offset until the end.
Optional Parameters
Second The offset into the search string at which to start looking for the pattern. Defaults to the start of the search string.
Third The length from the offset for which to search the string for the pattern. If omitted, defaults to searching to the end of the string.
Examples

To find the location of a substring within a string:

Use the [String->Find] tag. The following example finds the position of the word World within the string Blue World.

[Variable: 'theString' = 'Blue World']
[Output: $theString->(Find: 'World')]
Result:
6
Tag Link [String->Find] Category String
Type Member Data Source Any
Support Preferred Version 5.0
Output Type Integer Security None
Implementation Sets Lasso 5.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft