A
A
Alexman140032018-01-02 13:33:54
Delphi
Alexman14003, 2018-01-02 13:33:54

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

1 answer(s)
K
kalapanga, 2018-01-02
@kalapanga

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 question

Ask a Question

731 491 924 answers to any question