Help me trim this \ in the end of the string

Ras Tanura/

I want the result as Ras Tanura without /

@Gaurav07
StringVar=Ras Tanura/
OutString=StringVar.Replace(β€œ/”, β€œβ€)

Hi,

You can use TrimEnd Method as the following.

data=data.TrimEnd("/"c)

If the character is backslash, it will be data.TrimEnd("\"c)

Regards,

1 Like

Hi @Gaurav07

If the the β€œ/” comes always in the last position then it is better to do this way.

strName.Substring(0,strName.Length-1)

image

Regards,
Kommi Jeevan.

Hi @Gaurav07,

Do what @monika.c is suggesting, I think it’s the best way. Just use the assign activity. :slight_smile:
image

image