title: Delphi - Get the whole word where the caret is in a memo
body: <p>I need to be able to select the whole word of a TMemo if the caret is directly adjacent or in a word in the memo.</p>
  
  <p>Consider the following (where | is a caret)</p>
  
  <p><code>Here is some text|</code> = Select <code>text</code></p>
  
  <p><code>Here is so|me text</code> = Select <code>some</code></p>
  
  <p><code>|Here is some text</code> = Select <code>Here</code></p>
  
  <p><code>Here is some text |</code> = Select ''</p>