botka4aet 5 Posted May 21, 2019 So i have strings "Test1", "Test2", "Test3", "Test4" and so on. Any way to get integer from it? 1,2,3,4 Without if (a = "Test1") b := 1; else if (...... Quote Share this post Link to post Share on other sites
1 meko 170 Posted May 21, 2019 there's a few different ways: .@num = charat("Test3", 4); sscanf("Test3", "Test%d", .@num); .@num = substr("Test3", 4, 4); pcre_match("Test3", "^[^0-9]*([0-9]+)$"); .@num = $@regexmatch$[1]; 1 botka4aet reacted to this Quote Share this post Link to post Share on other sites
So i have strings "Test1", "Test2", "Test3", "Test4" and so on.
Any way to get integer from it? 1,2,3,4
Without
if (a = "Test1") b := 1; else if (......
Share this post
Link to post
Share on other sites