Explore Courses Blog Tutorials Interview Questions
0 votes
in RPA by (5.3k points)
I am saving a scraped number as a string (ex 12.50$) and comparing it to an excel table that has numbers as . I was using  to get rid of the zeroes but it removes zeroes in a number such as .034.

How do I remove the dollar sign from the front and also remove zeroes that might be on the end of the string?

1 Answer

0 votes
by (9.5k points)

 Try using string function TrimEnd(char) and .TrimStart(char)

Use this 

Dim st As String = "$12.50" st = st.TrimEnd("0"c).TrimEnd("."c).TrimStart("$"c)

Related questions

Browse Categories