Comparison of Strings with special characters

Discussion in 'Knowledge Base' started by admin, May 17, 2013.

    
  1. admin

    admin Administrator Staff Member


    Query:
    How do we compare 2 strings with each other including special characters?
    Solution:
    To compare strings with Special characters one needs to use the Platform Function ExactMatch. The reason why we need to use Function ExactMatch is usually Tally ignores special characters which means LT equals to L & T for simplicity.
    Hence, when comparisons need to be done including special characters like spaces, slashes, ampersands, etc. one needs to use Function ExactMatch to compare each character exactly.
    Code Snippet:
    $$ExactMatch:##VarInputString:” ”
    In the above code snippet, VarInputString is a Variable which is compared with another string " " (Space). Function ExactMatch returns True if the value of the Variable VarInputString equals to " ".
     


Share This Page