C
C#2y ago
itgel9462

❔ 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
Buddy
Buddy2y ago
$details
MODiX
MODiX2y ago
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)
itgel9462
itgel9462OP2y ago
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.
itgel9462
itgel9462OP2y ago
is that clear I used split() method to split a sentence 1 by 1 word and tried to display them in the frame.
Buddy
Buddy2y ago
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
CoRoys2y ago
string.ToCharArray() then join them.
itgel9462
itgel9462OP2y ago
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
CoRoys2y ago
Divide the text how? You want to make an array that contains each word found in a string Then split them by a comma?
Buddy
Buddy2y ago
string.Join(",", arr) joins an array separated by a comma into a string. Which will turn to what I mentioned above.
itgel9462
itgel9462OP2y ago
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
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server