House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Best way to create cflist of unique words from long text

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Walter Conti
05/06/2008 05:20 PM

Please advice function or steps to start putting together one. Thank you.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Skinner
05/06/2008 05:31 PM

Walter Conti wrote: > Please advice function or steps to start putting together one. > Thank you. Create a structure with the words as the keys.  Since a structure can have only one key of any given value, any duplicates will be consolidated.  You can then use structKeyList() if you truly need a list.  Also an easy way to count word if desired.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Daniel Roberts
05/08/2008 10:57 AM

http://www.bennadel.com/blog/432-Using-ColdFusion-Structures-To-Remove-Duplicate-List-Values.htm     * <!--- Create a structure to hold the movie titles. --->     * <cfset objMovies = StructNew() />     *       * <!--- Loop over the list to add mappings to the struct. --->     * <cfloop index="strMovie" list="#lstMovies#" delimiters=",">     *       * <!---     * Store key/value pair. In this case, we don't     * really care about the value (hence storing ""     * as value). We only care about the key.     * --->     * <cfset objMovies[ strMovie ] = "" />     *       * </cfloop>     *       * <!--- Convert the now unique key values into a list. --->     * <cfset lstMovies = StructKeyList( objMovies ) />


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference