save string.len() call
default for third parameter of string.sub() is already to use the rest of the string Co-authored-by: Christopher Head <chead@chead.ca>
This commit is contained in:
parent
b73fc28f11
commit
6651949665
2
lcd.lua
2
lcd.lua
|
@ -98,7 +98,7 @@ local create_lines = function(text)
|
|||
end
|
||||
if remaining < string.len(word) then
|
||||
line = line .. string.sub(word, 1, remaining)
|
||||
word = string.sub(word, remaining+1, string.len(word))
|
||||
word = string.sub(word, remaining+1)
|
||||
if flush_line_and_check_for_return() then return tab end
|
||||
else
|
||||
-- used up the word
|
||||
|
|
Loading…
Reference in New Issue