Skip to content

norux/vprint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vprint

Print any variable type in lua. Specially table type can be printed.

example

vprint = require ("lib.vprint")

-- print table
table = {1, 2, 3, 4, {['a'] = 100, ['b'] = 101, {['c'] = 200, ['d'] = "300", {'a', 'b'}}}}
vprint(table)

-- print string
string = "test string"
vprint("string: ".. string)

-- print number
number = 123
vprint("number: " .. number)

output

table: 0x7fab52408d80
{
   [1] = 1,
   [2] = 2,
   [3] = 3,
   [4] = 4,
   [5] = table: 0x7fab52409190
   {
      [1] = table: 0x7fab52408970
      {
         [1] = table: 0x7fab52408770
         {
            [1] = "a",
            [2] = "b"
         },
         [c] = 200,
         [d] = "300"
      },
      [a] = 100,
      [b] = 101
   }
}

string: test string
number: 123

About

Print any variable type in lua. Specially table type can be printed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages