Remove unwanted character at the end of the stringvariable

Hi Can any one help me to find a solution for the below
i need to remove only the “-” at the end

str = str.Substring(0, str.Length-1)

this should work for you str_variable = str_variable.Trim("-"c)

1 Like

Try to get the required date\string using Regex method.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.