❔ Display string that divided 1 by 1 word in textbox.
I tried to display string sentence 1 by 1 word in textbox. I used string.split() method to split. But in textbox the string did not get split,which means the sentence is displayed as it was. How can I display?
11 Replies
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
I'm trying to create this reading technique spritz. I created a frame in XAML and in this method I'm calling the frame. String is just for example (japanese though). x_coordinate.Text represents text that will display in the frame.
is that clear
I used split() method to split a sentence 1 by 1 word and tried to display them in the frame.
Do you want to split text then join the array of strings by
,
?
That will result in something like this
hello world foo bar
will turn to
hello,world,foo,bar
string.ToCharArray()
then join them.This method only does comma split? I didn’t know that sorry. I thought that is the way to divide the text. Should I use other method to make this Spritz frame?
Divide the text how?
You want to make an array that contains each word found in a string
Then split them by a comma?
string.Join(",", arr)
joins an array separated by a comma into a string. Which will turn to what I mentioned above.What I thought is like divide by comma first, and if the comma comes out in the frame, just remove the comma and the word before it. Then pick up the next word and it continues.
Main task is create that Spritz frame. To make it, I thought I had to divide words 1 by 1 by using string.split().
I'm sorry for my bad explanation .
Now what I want to ask is, Is this way possible to do? Or is there some method that more useful for my task? What do you guys think
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.