/**
 * String functions
 * 
 * @category    Utilities
 * @package     ATProcessor
 * @author      Sam Meredith <sam@aandtinstruments.com>
 * @version     0.1
 */

/**
 * Capitalise first letter of each word, lower case the rest of the word
 */ 
function toTitleCase(str) {
    if (str !== undefined) {
        return str.replace(/\b\w+/g, function(word) {
            return word.charAt(0).toUpperCase() + word.substr(1).toLowerCase();
        });
    }
}