Lasso Soft Inc. > Home

[ String->BeginsWith ]

Method

[String->BeginsWith] returns True if the base string begins with the string parameter, False otherwise. Requires a single string parameter. The test is not case sensitive.

  • Syntax
'String Variable'->beginswith('Pattern String')
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 <font>...</font> tags, otherwise it is displayed normally.

Code

local(Company_Name) = 'LassoSoft'
if(#Company_Name->beginswith('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