i need to delete the last caractere in a sentence if is a space
Try to use RTrim(text)
there are many spaces in the sentence i need only the last one
Hello @Soudios
You can the below expression.
our_String.TrimEnd
how can i do that only if there is a space in the last caractere plz ?
Do it using conditional statement like, for example lets assume that the is a variable called name that holds the string of characters. Use the code as follow:
if(name.substring(length()-1)==“\n”) //this conditional statement check if the is a newline/empty space after the string
then you just use name.delete(length()-1)
That’s literally what TrimEnd does. It removes any extra spaces at the end. Try it.
Hey @Soudios
Use an Assign activity like this:
Left Assign:
Your_string
Right Assign:
Your_string.Trim
Take a look here:
Hopefully this helps
Cheers
Steve
@Soudios
If you use the below expression it will remove the last space.
our_String.TrimEnd
Hi @Soudios
Use this to delete last space character in string: our_String.TrimEnd