houdini, scripts, vex

VEX: split string and convert to integer


//Split @anotherAttribute based on ‘_’
string myString[] = split(s@anotherAttribute, “_”);

//Use last element as attribute value
s@tempString = myString[-1];
//convert string to integer
i@myIntegerFromString = atoi(s@tempString);

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 7 =