Lasso Soft Inc. > Home

[ string->contains ]

Method

[String->Contains] returns True if the string contains the parameter as a substring. Requires a single string parameter. The test is not case sensitive.

  • Syntax
'String Variable'->contains('String Value')
Examples
  • Beginner

To change the color of text if it begins with the word Lasso:

Use the [String->Contains] method within the [If] ... [/If] conditional. If the string Company_Name contains the word Lasso then the company name is colored blue using ... tags, otherwise it is displayed normally.

Code

local(Company_Name) = 'LassoSoft'
if(#Company_Name->contains('Lasso'))
  '<font color="blue">'+#Company_Name+'</font>'
else
  #Company_Name
/if

Result

<font color="blue">LassoSoft</font>

Recent Comments

No Comments found

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