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.159 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.158 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.157 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.156 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.155 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.154 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.153 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.152 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.151 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.150 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.149 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.148 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.147 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.146 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.145 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.144 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.143 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.142 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.141 tracks/cfml/exercises/pangram/Solution.cfc
trackler-2.2.1.140 tracks/cfml/exercises/pangram/Solution.cfc