Tuesday 16 May 2017

Getting data from strings

for example, once you've shattered something you end up with a lot of "pieces". Piece1, piece2, piece56000.
You might want to use the number as a seed value.
Usually the piece number is stored in the @name attribute.
In a wrangle, you can strip out the word piece, as follows... (and use atoi, to convert the string number to a number number)


s@testval=s@name;

@testval=strip(@name,"piece");
f@randval=rand(atoi(@testval));

No comments:

Post a Comment