text = "Hello world" --text:sub(<start-index>,<end-index (inclusive)>) --to get the word "Hello" sub_text = text:sub(1,5)