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.119 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.118 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.117 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.116 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.115 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.114 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.113 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.111 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.110 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.109 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.108 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.107 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.106 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.105 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.104 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.103 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.102 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.101 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.100 tracks/cfml/exercises/acronym/Solution.cfc
trackler-2.2.1.99 tracks/cfml/exercises/acronym/Solution.cfc