title: (Lua) How do I break a string into entries on a table?
body: <p>So I want to take an input like R U R' U' and turn it into a table that contains</p>
  <pre><code>R
  U
  R'
  U'
  </code></pre>
  <p>I haven't found an example of code that worked. I have tried <a href="https://www.codegrepper.com/code-examples/lua/lua+split+string+into+table" rel="nofollow noreferrer">this</a> solution from codegrepper, and it didn't work. I have not come up with anything else in my head but my general program, which is supposed to take an input like R and find its place in a table. If R is 1, then it will take the value 1 from another table, which will have the r^ as value 1. Then it will do this with the rest and print it when it is done. So if there is an optimization with this that could make it all quicker than I would like to see it. Thanks and goodbye.</p>