C#
C#

help

Root Question Message

Itgel
Itgel2/1/2023
❔ 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?
Buddy
Buddy2/1/2023
$details
Itgel
Itgel2/1/2023
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.
Itgel
Itgel2/1/2023
is that clear
Itgel
Itgel2/1/2023
I used split() method to split a sentence 1 by 1 word and tried to display them in the frame.
Buddy
Buddy2/1/2023
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
CoRoys
CoRoys2/1/2023
string.ToCharArray() then join them.
Itgel
Itgel2/1/2023
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?
CoRoys
CoRoys2/1/2023
Divide the text how?
CoRoys
CoRoys2/1/2023
You want to make an array that contains each word found in a string
CoRoys
CoRoys2/1/2023
Then split them by a comma?
Buddy
Buddy2/1/2023
string.Join(",", arr) joins an array separated by a comma into a string. Which will turn to what I mentioned above.
Itgel
Itgel2/1/2023
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.
Itgel
Itgel2/1/2023
Main task is create that Spritz frame. To make it, I thought I had to divide words 1 by 1 by using string.split().
Itgel
Itgel2/1/2023
I'm sorry for my bad explanation .
Itgel
Itgel2/1/2023
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
ContactFrequently Asked QuestionsJoin The DiscordBugs & Feature RequestsTerms & Privacy