FileDocCategorySizeDatePackage
Functions.javaAPI DocGlassfish v2 API2664Fri May 04 22:34:22 BST 2007jsp2.examples.el

Functions

public class Functions extends Object
Defines the functions for the jsp2 example tag library.

Each function is defined as a static method.

Fields Summary
Constructors Summary
Methods Summary
public static java.lang.Stringcaps(java.lang.String text)

        return text.toUpperCase();
    
public static intnumVowels(java.lang.String text)

        String vowels = "aeiouAEIOU";
	int result = 0;
        for( int i = 0; i < text.length(); i++ ) {
	    if( vowels.indexOf( text.charAt( i ) ) != -1 ) {
	        result++;
	    }
	}
	return result;
    
public static java.lang.Stringreverse(java.lang.String text)

        return new StringBuffer( text ).reverse().toString();