image

Sentence a String to Capital Punishment.

A simple function to help dynamically capitalize text and an excuse to try writing script with the WebMaster Android app, then post it from the WordPress Android app. Nice little script editor for a smart phone or tablet.

Even though this function and post are small, writing them from a little smart phone is "capital" punishment. After previewing my post I ending up logging into a desktop browser anyway to correct formatting which the WordPress mobile app could not handle from my script example below. Writing script from a small device is also uncomfortable. Using a tablet would be easier but does not necessarily make a lighter "sentence".


<script type="text/javascript">
var word="keith";
document.write(word);
/**
* Capitalizes the first letter of String.*
**/
function capitalize(W)
{
    return W.substr(0,1).toUpperCase()+W.substr(1,W.length);
}
</script>

Leave a Comment

Thanks for visiting www.keith-hair.net