wupeng Posted June 23, 2020 Share Posted June 23, 2020 hello how can convert string attribute into array attribute . like this cause my aim is l want to calculate how many "/" in path attribute so l try to do this and will use foreach function to relaise it think you . oppppppp english is toooooooooo hard Quote Link to comment Share on other sites More sharing options...
wupeng Posted June 23, 2020 Author Share Posted June 23, 2020 (edited) or , are you have some simple way to calculate how many "/" in path attribute . please tell me. thank you Edited June 23, 2020 by wupeng Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted June 23, 2020 Share Posted June 23, 2020 Hi, if you have a string "s" you use len(s) to get its length and s to get access for a single char. string_to_array.hipnc 1 Quote Link to comment Share on other sites More sharing options...
j00ey Posted June 23, 2020 Share Posted June 23, 2020 in a wrangle: int pos[] = find(s@path, "/"); i@num = len(pos); 1 Quote Link to comment Share on other sites More sharing options...
wupeng Posted June 23, 2020 Author Share Posted June 23, 2020 2 hours ago, Aizatulin said: Hi, if you have a string "s" you use len(s) to get its length and s to get access for a single char. string_to_array.hipnc thank you , you are amazing Quote Link to comment Share on other sites More sharing options...
wupeng Posted June 23, 2020 Author Share Posted June 23, 2020 2 hours ago, j00ey said: in a wrangle: int pos[] = find(s@path, "/"); i@num = len(pos); thank you,master,it is great Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.