perf(runtime): vim.trim for long only whitespace strings

This commit is contained in:
monkoose
2025-05-22 13:00:22 +03:00
committed by Lewis Russell
parent ba1cc9e10c
commit 5e64d92411
3 changed files with 76 additions and 2 deletions

View File

@@ -719,10 +719,12 @@ describe('lua stdlib', function()
{ ' b ', 'b' },
{ '\tc', 'c' },
{ 'r\n', 'r' },
{ '', '' },
{ ' \t \n', '' },
}
for _, q in ipairs(trims) do
assert(q[2], trim(q[1]))
eq(q[2], trim(q[1]))
end
-- Validates args.