In Tosca, Use dynamic expressions to modify and verify data in strings. If your string contains special characters, you have to escape them. You can also use dynamic expressions with string operations.
STRINGTOLOWER-- Converts uppercase characters in the string to lowercase characters.
Syntax: {STRINGTOLOWER[InputText]}
Example
{STRINGTOLOWER[Nice Day]}
Ans:
nice day
STRINGTOUPPER -- Converts lowercase characters in the string to uppercase characters.
Syntax: {STRINGTOUPPER[InputText]}
Example :
{STRINGTOUPPER[Nice Day]}
Ans:
NICE DAY
TRIM-- Removes whitespace characters from the start or the end of the string, or both:
If you don't use an optional parameter, the expression removes whitespace characters from both the start and the end of the string (default).
If you use the optional parameter [START], Tricentis Tosca removes whitespaces from the start of the string.
If you use the optional parameter [END], Tricentis Tosca removes whitespaces from the end of the string.
If you use the optional parameter [REPLACEFIRST], Tricentis Tosca only replaces the first occurrence.
If you use the optional parameter [IGNORECASE], Tricentis Tosca ignores the letter case during the search.
If you use the optional parameter [IGNORECASE], Tricentis Tosca ignores the letter case during the search.
Syntax: {NUMBEROFOCCURRENCES[InputText][Pattern][Optional parameter]}
Example --
{NUMBEROFOCCURRENCES[Mississippi][ss]}
Ans-
2
STRINGLENGTH-- Counts the number of characters in the string.
Syntax: {STRINGLENGTH[InputText]}
Example -
{STRINGLENGTH[Nice2MeetU]}
Ans-
10
No comments:
Post a Comment
Note: only a member of this blog may post a comment.