angular.module('cs.history', []).controller('HistoryController', function($scope) {
	$scope.formatKey = function(key, splitBy, replaceWith) {
		if (!key) {
			return '';
		}
		if (typeof(key) !== 'string') {
			key = angular.toJson(key);
		}
		var splitkey = key.split(splitBy);
		var outkey = splitkey[0].substring(0, 1).toUpperCase() + splitkey[0].substring(1);
		for (var i = 1; i < splitkey.length; i++) {
			outkey += replaceWith;
			outkey += splitkey[i];
		}
		return outkey;
	}
});
