Sha256: 9f8acc68575f3c4bdfbb415b109de7d655a2a1f4e99fd7b1915c8919a825ae45

Contents?: true

Size: 396 Bytes

Versions: 146

Compression:

Stored size: 396 Bytes

Contents

/**
* Here is an example solution for the Acronym exercise
*/
component {

	function abbreviate( phrase ) {
		
		return phrase
			// Break up string on spaces or hyphens
			.listToArray( ' -' )
			// Strip first char of each word
			.map( function( word ) {
				return word.left( 1 );
			} )
			// Concat back to string
			.toList( '' )
			// Upper case for good measure
			.uCase();
			
	}
			
}

Version data entries

146 entries across 145 versions & 1 rubygems

Version Path
trackler-2.2.1.78 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.77 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.76 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.75 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.74 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.73 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.72 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.71 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.70 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.69 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.68 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.67 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.66 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.65 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.64 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.63 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.62 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.61 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.60 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.59 tracks/cfml/exercises/acronym/Solution.cfc