Lasso Soft Inc. > Home

[Bytes->Find]

Returns the position of the beginning of the parameter sequence within the bytes instance, or 0 if the sequence is not contained within the instance. Four optional integer parameters (offset, length, parameter offset, parameter length) indicate position and length limits that can be applied to the instance and the parameter sequence.

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

[Bytes Variable->(Find: Value, Integer, Integer, Integer, Integer)]
Required Parameters
Value A value of any type to be searched for within the bytes object.
Optional Parameters
Fourth Integer Size of the data within the parameter value to use.
Third Integer Character offset within the parameter value.
Second Integer Size of the data to search within the bytes instance.
First Integer Character offset within the bytes instance.
Examples

To find the position of a word within a bytes instance:

Use the [Bytes->Find] tag. The following example finds the starting position of the word 'The' in the bytes instance.

[Var:'Bytes'=(Bytes: 'The Object')]
[$Bytes->(Find: 'The')]
Result:
1
Tag Link [Bytes->Find] Category Bytes
Type Member Data Source Any
Support Preferred Version 7.0
Output Type Bytes Security Integer
Implementation Sets Lasso 7.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