String to integer

Hi all. I’m trying to pass the coordinates of a component through an editable label. How do I convert a String (eg: into 4 variables. Thank you in advance for your response.

Check out the StringArray::addTokens function.

“Breaks up a string into tokens and adds them to this array.”

You didn’t say whether you needed to convert to integer. But if you do, then use String::getIntValue()

1 Like

Thank you very much.