Jump to content
afx

Delete the numbers in a string, attribute wrangle

Recommended Posts

Is theres quick way to delete the numbers in a string of crowd assets.

string name = "nameOfCharacter56" - what I have

string name = "nameOfCharacter" - what I need

Share this post


Link to post
Share on other sites

I have multiple characters names. So I needed to find a way to separate the iterations from the character. 

Something like this worked a bit better. Any Suggestions to what could of been more efficient? 

i@iteration = opdigits(@name);
s@convertToString = itoa(@iteration);

string parts[] = split(@name, @convertToString);

s@name = parts[0];

 

attribstringedit_v2.hipnc

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×