9

Comment peut diviser un texte avec retour a la ligne ?

 2 years ago
source link: https://www.codeproject.com/Questions/5330477/Comment-peut-diviser-un-texte-avec-retour-a-la-lig
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

See more:

Comment peut diviser un texte avec retour a la ligne ? the problem c'est je ne connais qu'est la method correcte car je suis débitant en visual-studio

Translation:

How can a text be split with a line break? the problem is I don't know what the correct method is because I'm selling in visual-studio

What I have tried:

Bonjour, moi je travaille avec la méthode de "split string "elle fonctionne mais je peux faire un retour a la ligne sans supprimer le variable de split
Translation:

Hello, I work with the "split string" method, it works but I can make a line break without deleting the split variable

VB.NET
Copy Code
Public Class Form1

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox1.Text = "5156785123579"
End Sub
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
TextBox2.Clear()

For Each word As String In Split(TextBox1.Text, "5")
TextBox2.Text = TextBox2.Text & word & vbCrLf & word
Next

End Sub


'il m'affiche
Translation:

It shows me

Copy Code
'1
'678123
'12379
'79


moi je recherche a l'afficher de sa facon
Translation:

I am looking to display it in his own way

Copy Code
'51
'5678123
'512379
'579

le 5 reste sans supprimer et faire une retour a ligne
est la méthode de split est faux si faux qu'elle la meilleur solution
merci d'avance <3
Translation:

the 5 remains without deleting and returning to line
is the split method is wrong if wrong it the best solution
thanks in advance <3


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK