Answer the question
In order to leave comments, you need to log in
How to print the same words from a string in Delphi?
I need to display the same words from a string that was entered by the user in Edit. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Obviously, first you need to split the string into words and put them to taste, for example, in an array or StringList. But how you will do this depends on what you have entered there. In general, you need to run along the line and check each character to see if it is a separator (space, punctuation marks, anything else). If something is entered through one specific separator, then you can use the TStringList.DelimitedText property, it will divide the line itself. And then analyze the list of words as you want.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question