Hey guys ,
A string manipulation favour here -
I have my string like -
C:\Users\ggeshtwin\Desktop\AP_All_Latest_Run\FIN B2 03.31.2022.pdf
How do I check if my string ends with “.pdf” so that I can pick that.
I know there is a way like String.contains(“.pdf”)
But wanted to know if there is anything related to the end point of a string to distinguish with?
How about this express?
This expression will get only the PDF file inside the folder. Just give the Path
Hello @gokul1904 ,
You can use : YourStringVar.Split("."c).LastOrDefault.equals(“pdf”)
As an alternate also have a look at:
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.