Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Variable string manipulation #31

Open
CAL77 opened this issue Jul 5, 2016 · 1 comment
Open

Feature Request: Variable string manipulation #31

CAL77 opened this issue Jul 5, 2016 · 1 comment

Comments

@CAL77
Copy link

CAL77 commented Jul 5, 2016

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?

@ady624
Copy link
Owner

ady624 commented Jul 6, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants