Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want to test a text following a specific character as long as it finds this character example "20" it displays the sentence that finds after "20" with size of 13 characters

What I have tried:

I want to make a modification to my textbox 1 which has to receive a text from textbox 2 me I write in textbox2 a random text ,so in textbox1 do a test when it finds a specific word for example "20" it adds "20" and 13 characters
following from text box 1 after it finds the "20" again and do the same thing when it finds "20
Posted
Updated 26-Apr-22 1:41am

1 solution

This is basic stuff: it's what I told you to do yesterday: Handle with text to arrange[^]

You need to use the String.IndexOf Method (System) | Microsoft Docs[^] to find the first index, then use an overload to find the second and subsequent indexes. You can then use String.Substring Method (System) | Microsoft Docs[^] to break out the "chunks" of text you are interested in.

How have you managed to get to textboxes without learning the basics about strings?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900