he comparison of strings does not return the same result wether the ' ' are on the right part or on left part of the string chain.
If you run the following script sequence:
{code}
:PRINT "================================="
:PRINT "CONTROLE ' ' removed only right side"
:PRINT "================================="
: IF ' TUTU' <> ' TUTU '
: PRINT "[RAW STRING CHECK ] - ' WORD' AND ' WORD ' DIFFERENT!"
:ELSE
: PRINT "[RAW STRING CHECK] - ' WORD' AND ' WORD ' NOT DIFFERENT!."
: ENDIF
:PRINT "================================="
:PRINT "CONTROLE ' ' removed only Left side"
:PRINT "================================="
: IF 'WORD ' <> ' WORD '
: PRINT "[RAW STRING CHECK ] - 'WORD ' AND ' WORD ' DIFFERENT!"
:ELSE
: PRINT "[RAW STRING CHECK] - 'WORD ' AND ' WORD ' NOT DIFFERENT!"
: ENDIF
{code}
the report will contain the following result
{code}
=================================
CONTROLE ' ' removed only right side
=================================
[RAW STRING CHECK] - ' WORD' AND ' WORD ' NOT DIFFERENT!.
=================================
CONTROLE ' ' removed only Left side
=================================
[RAW STRING CHECK ] - 'WORD ' AND ' WORD ' DIFFERENT!
{code}
Surprisingly, the result of this logical test is not the same. The automate considers ' TUTU' and ' TUTU ' as identical.
Release : 12.0,12.1,12.2,12.3,21.0
Component : AUTOMATION ENGINE
This behavior is as expected by design
===============================
As stated in the documentation of :IF... :ELSE... :ENDIF since at least v11.2
Quote: "Trailing blank spaces are not considered in string comparisons."
==================================