I was looking for clues all around this community and MIT app inventor forum, and i haven’t found any useful clue for my doubt, or just the topic is closed.
Sorry if didn’t look for it well
From a text string, for several times, it’s about to get only one random character, and only the picked one has to be removed from the string
Let’s suppose the string NORTHEASTSOUTHWEST (no spaces nor commas…)
It’s selected by random the character S (placed in South)
Now the string should remain as NORTHEASTOUTHWEST
And then several times more…
I do the random selection by ‘random integer from 1 to length…’ block to pick one character using the ‘segment text start length’ block
But, how i do the second part? I have been watching around there for a long time how to use replace all text, but it’s not about replacing all the S around the text, or the other text blocks as trim, segment, split and so… but i can’t imagine or find up the right steps…
I believe still there is an issue with split at an empty separator depending android version ≤ 9 or ≥ 10. If android version is ≤ 9 then an empty string is added in the beginning of list and that is the reason I added a check (list’s lenght and text lenght). Otherwise if random number is 1 and android version ≤ 9 the result will be the same word I believe
Many thanks for your answers! Your tips are right for me, I’ve learnt a lot from them!
So, I’m now trying to do your tips
But, in the meanwhile, i’d like to know your tips about the second and next times to do the next selection and removing, i just need a clue, no need blocks (of course, if so, i’d thank it)
I’ve tryed the Anke’s tip, but it doesn’t work
Is it not global list a list with only one item?
Then how to remove list item index random… ?
So, it is showed a runtime error