CoRE icon indicating copy to clipboard operation
CoRE copied to clipboard

Feature Request: Variable string manipulation

Open CAL77 opened this issue 8 years ago • 1 comments

String manipulation could get crazy, but all that I find necessary would be conversion of a string value to a number for additional arithmetic and evaluations.

https://community.smartthings.com/t/smart-weather-station-tile-app/2710/129?u=cal7

Is it containing words followed by the number? Perhaps I can modify CoRE's casting function to "extract" all digits from the string and convert them to a number?

CAL77 avatar Jul 05 '16 18:07 CAL77

Casting is automatic when you try to do math. All parameters are cast to the the selected type (which is the reason I ask of the variable type in the Set Variable). Have you tried that?

Oh, you mean, pick all the digits in a string and parse a number out of it. Got it.

ady624 avatar Jul 06 '16 01:07 ady624