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.180 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.179 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.178 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.177 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.176 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.175 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.174 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.173 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.172 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.171 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.170 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.169 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.167 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.166 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.165 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.164 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.163 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.162 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.161 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.160 tracks/cfml/exercises/acronym/Solution.cfc