Published on : August 19, 2020
Title : if.str
Purpose : The Condition to check given variable data type is a String type.
Syntax : [if.str variable_name]
//** Do something if given variable name is a String type **//
[/if.str]
Input Parameters :
variable_name : The variable name which we want to check that given variable is a String type
Return Value : It return boolean value (true/false)
Example 1 :
Code : [template.customer_name = “Roy” /]
[if.str template.customer_name]
Given variable is a String type.
[/if.str]
Output : Given variable is a String type.
Description : In the example, define variable customer_name is stored value is a type String, then condition will get satisfied hence logic inside will get executed.
Example 2 :
Code : [template.value_1 = 200/]
[if.str template.value_1]
Given variable is a String type.
[/if.str]
Output :
Description : In the example, define variable value 1 stored value is an Integer type , then the condition will not get satisfied hence logic inside will not get executed.