title: How to convert String to Byte array in react native?
body: <p>I know this question asked in different ways but I couldn't find the right answer that fit to react native...</p>
  
  <p>How to convert String to Byte array I react native?</p>
  
  <p>For example I would like the function will be like that:</p>
  
  <p>StringToByteArray('hello')</p>
  
  <p>The output should be something like that:
  [72,0,101,0,108,0,108,0,111,0]</p>
  
  <p>I have been looking in <a href="https://stackoverflow.com/questions/6226189/how-to-convert-a-string-to-bytearray">this</a> post, but it seems the answers are incorrect or invalid...</p>