Sha256: f2a99b397637019b7e70a49dd41b8d22b8d88429366fb4cca29fe5353009a38f

Contents?: true

Size: 441 Bytes

Versions: 74

Compression:

Stored size: 441 Bytes

Contents

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

	 function isPangram( sentence ) {
	 	// Lowercase sentence to simplify search
		sentence = sentence.lCase();
		var i = 96;
		// ASCII codes 97-122 are a-z
		while( ++i <= 122 ) {
			// If any letter is missing, then quit
			if( !sentence.find( chr( i ) ) ) {
				return false;
			}
		}
		// If we made it through, then all letters were found!
		return true;
	}
		
}

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.179 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.178 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.177 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.176 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.175 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.174 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.173 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.172 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.171 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.170 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.169 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.167 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.166 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.165 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.164 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.163 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.162 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.161 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.160 tracks/cfml/exercises/pangram/Solution.cfc