Imagine you have a string variable that holder a credit
card (16digit). There are multiple ways of obtaining last
four digits of this number programmatically on a run time.
Name one; for practical purpose variables name is sCCnumber?
Answers were Sorted based on User's Feedback
Answer / smitha
Use Right function
sSubstring = Right (sString, iNumChars)
Eg. sCCnumber = "123456786543245"
Print ( right (sCCnumber ,4)
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ruchi
String sCCnumber = "123456786543245"
sCCnumber=Substr(sCCnumber,12,4)
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sateesh_t7101@yahoo.co.in
i think use Edit_get_selection
if wrong plz ....
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / uday kumar. a
Just use the mod operator.
Say x=1234567
then modValue=x mod 10000
The modValue has a value of 4567
Another technique is by using substring function.
Try solution for substring function
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vimalkanth
Try using stuff method. The examples defined in help are
good enough.
| Is This Answer Correct ? | 0 Yes | 0 No |
Any tools to test the performance of SQL Quarries and SP? If any one are using them please provide the site names or software names...
How dom browser extension identify a web application ui object?
How to record a test case?
How to create a new silktest project?
What are the default testplan attributes?
How to write the good frame work for application.
What are the types of text lines in a testplan file?
What are the reasons behind silk test hanging? Is any particular problem or it is just because of system problem.?
Can we use regular expressions to facilitate dynamic objects identification by SilkTest?
In SilkTest we have a function Except Log which displays the path of the error occured in a Script.In QTP do we have any function like that?
What is the advantage of using do except instead of other error logging functions?
What are the possible failure scenarios and different types of errors you find in silkTest?