Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam UiARD All Questions

View all questions & answers for the UiARD exam

Exam UiARD topic 3 question 44 discussion

Actual exam question from UiPath 's UiARD
Question #: 44
Topic #: 3
[All UiARD Questions]

A developer needs to create an automation process that identifies a file with format "Monthly_Report_MMddyyyy.xlsx". The file name is saved to a variable called strinput.
To extract the date from strinput, which string manipulation method should be used?

  • A. strinput.Substring(strInput.LastIndexOf("_")+1,8)
  • B. strinput.Substring(strInput.IndexOf("_")+1,strInput.IndexOf(".")−1)
  • C. strinput.Substring(strInput.IndexOf("_")+1.8)
  • D. strinput.Substring(strInput.IndexOf("_")+1,strInput.IndexOf("."))
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Ingvarn
1 year ago
Selected Answer: A
Answer = 'A'
upvoted 1 times
...
Ingvarn
1 year ago
Selected Answer: A
Answer = 'A'
upvoted 1 times
...
bhaskar5a5
1 year, 2 months ago
Ans :A
upvoted 1 times
...
Mirjalol
1 year, 4 months ago
Selected Answer: A
Answer = 'A', tested in uipath studio
upvoted 2 times
...
Tharaka
1 year, 5 months ago
Selected Answer: A
Correct answer is A Explanation: The Substring method is used to extract a portion of a string based on the specified start index and length. strinput.LastIndexOf("_") returns the index of the last occurrence of the underscore "_" character in the string. Adding 1 to the index (strinput.LastIndexOf("_")+1) will move the starting position to the character right after the underscore. The second argument, 8, indicates the length of the substring to extract, which in this case is 8 characters representing the date "MMddyyyy" (i.e., the month, day, and year). By using strinput.Substring(strInput.LastIndexOf("_")+1,8), you can extract the date portion from the file name. Therefore, the correct choice is option A: strinput.Substring(strInput.LastIndexOf("_")+1,8).
upvoted 2 times
...
Engineer24
1 year, 7 months ago
Selected Answer: A
If you test in studio, just first option works and extract the format "MMDDYYYY".
upvoted 2 times
...
Shane1407
1 year, 7 months ago
A must be the right answer
upvoted 1 times
...
Online
1 year, 7 months ago
Selected Answer: A
https://learn.microsoft.com/en-us/dotnet/api/system.string.lastindexof?view=net-8.0
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...