title: Remove last char string when string contains emojis
body: <p>I'm using React Native (chat), in this app I have one emoji picker but when users press virtual backspace button emojis only remove their last unicode byte. </p>
  
  <p>How can I detect if last 'chat' (set of unicodes) is standalone emoji unicode?</p>
  
  <p>Code to split it:</p>
  
  <pre><code>inputValue.substring(0, inputValue.length - 1)
  </code></pre>
  
  <p>I also tried to use Array.from(), then use slice(0,-1) and correct solutions to all cases appears when I console log it. BUT! When I set the SAME variable to the TextInput appears: 321331231221.</p>
  
  <p>Some examples:</p>
  
  <pre><code>"Hello".length
  7
  
  "Hello".slice(0,-1)
  'Hello�'
  
  Array.from("Hello")
  [ 'H', 'e', 'l', 'l', 'o', '' ]
  
  Array.from("Hello").slice(0,-1)
  [ 'H', 'e', 'l', 'l', 'o' ]
  
  Array.from("Hello").slice(0,-1).join('')
  'Hello'
  </code></pre>
  
  <p>But if I set this last solution in my React Native TextInput component I see something like this: 312412412411 (maybe all in hex). If the value has not emojis I see the same result as well.</p>
  
  <p>When I set the emoji with the emoji picker, something like <code>${inputValue}${newEmoji}</code> all works out.</p>
  
  <p>I do not know what to think guys :/</p>