Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21238

[RESOLVED] How to detect repeated names in a string of names?

$
0
0
A typical string will look like this:

"sam,larry,bill,mary,allen,jim,fred,joe,john"

This string is correct in the sense that no names are repeated

However, on occasions, the string could look like this:

"sam,larry,bill,sam,mary,allen,sam,jim,fred,bill,joe,john"

'sam' is repeated two times and 'bill' is repeated one time . I do not know from one time to the next what names will appear in the string so I cannot check on fixed names.

Is there a simple way to detect if any name appears more than once and remove it from the string if it does?

Viewing all articles
Browse latest Browse all 21238

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>