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.39 tracks/coldfusion/exercises/acronym/Solution.cfc
trackler-2.2.1.38 tracks/coldfusion/exercises/acronym/Solution.cfc
trackler-2.2.1.37 tracks/coldfusion/exercises/acronym/Solution.cfc
trackler-2.2.1.36 tracks/coldfusion/exercises/acronym/Solution.cfc
trackler-2.2.1.35 tracks/coldfusion/exercises/acronym/Solution.cfc
trackler-2.2.1.34 tracks/coldfusion/exercises/acronym/Solution.cfc