title: how to check type first letter from enter word
body: <p>I create one input text and I check first letter from enter any word that if this word was english direction to be ltr or if this word was arabic direction to be rtl.</p>
  
  <p>I dont know how understand unicode first letter . please guide me .
  this is my code:</p>
  
  <pre><code>$(document).ready(function(){
              $('.inputtext').keyup(function(){
                  var text = $(this).val();
                  firstLetter = text.substr(0,1);
                  console.log(firstLetter);
                  if(//to be english )
                  {
                      console.log('english');
                  }
                  if(//to be arabic)
                  {
                      console.log('arabic');
                  }
              });
          });
  </code></pre>