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.139 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.138 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.137 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.136 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.135 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.134 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.133 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.132 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.131 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.130 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.129 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.128 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.127 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.126 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.125 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.124 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.123 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.122 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.121 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.120 tracks/cfml/exercises/acronym/Solution.cfc