Hello guys, I need ever take a last name… And ever have more strings than other.
Exp:
Ronaldinho Gaucho
I need take : Gaucho
Diego Armando Maradona Soarez
I need take: Armando Marado Soarez
Help pls?
Thx!
Hello guys, I need ever take a last name… And ever have more strings than other.
Exp:
Ronaldinho Gaucho
I need take : Gaucho
Diego Armando Maradona Soarez
I need take: Armando Marado Soarez
Help pls?
Thx!
String.split will split your string into an array of string.
You can then access the relevant array items I. E.
NameArray = “Ronaldo Gaucho”.Split(" ")
NameArray(1) would then return Gaucho for example
Hi @Diego_Pin
Do you have a list of words that you need to avoid in every name?
Regards,
Aditya
@Diego_Pin it sounds like you want to skip the first one each time. To do that, use the following in an assign activity where YourNewString is a string variable.
Assign YourNewString = Strings.Join(strinput.Split(" "c).Skip(1).Toarray())
This performs a few operations on your InputString. First it splits it into a string array by each space in the InputString. Then it skips the first element in the array, and finally it rejoins the string array back into a single string
EDIT: The first formula I posted had some syntax errors, fixed the assign activity so it should work as explained now
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.