Just for anyone else who is interested in the solution here, based on fris' excellent example this is changing the post content, you could replace ucwords with any function or series of functions to modify your post content.
Code:
<?php
/*
Plugin Name: Your own Plugin
Plugin URI: http://someurl.com
Description: Converts the fist letter of every word to upper case.
Author: Your Name
Version: 1.5
*/
function change_content($data,$postarr) {
$old_content = $data['post_content'];
$new_content = ucwords($old_content);
$data['post_content'] = $new_content;
return $data;
}
add_filter('wp_insert_post_data','change_content',99,2);
?>