Pangram checker: Difference between revisions

m
→‎{{header|Java}}: Removed unnecessary concatenation and toLowerCase() operation, added early exit if character is missing.
m (→‎{{header|PARI/GP}}: ...and show its use)
m (→‎{{header|Java}}: Removed unnecessary concatenation and toLowerCase() operation, added early exit if character is missing.)
Line 466:
<lang java5>public class Pangram {
public static boolean isPangram(String test){
booleanfor pangram(char a = true'A'; a <= 'Z'; a++)
if ((test.indexOf(a) < 0) && (test.indexOf((char)(a + 32)) < 0))
String lcTest = test.toLowerCase();
for(char a = 'a'; a <= 'z'; a++){ return false;
return pangramtrue;
pangram &= lcTest.contains("" + a);
}
return pangram;
}