Happy Birthday!
-Brian
It is currently April 28th, 2024, 12:12 pm
Happy Birthday Smurfier!
-
- Developer
- Posts: 2688
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
-
- Rainmeter Sage
- Posts: 16183
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
-
- Rainmeter Sage
- Posts: 5407
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Happy Birthday Smurfier!
Happy Birthday Smurfier!
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Happy Birthday Smurfier!
Many happy returns Smurfie!
-
- Developer
- Posts: 522
- Joined: March 2nd, 2016, 6:23 pm
Re: Happy Birthday Smurfier!
Happy birthday Smurfier! :DDD
-
- Rainmeter Sage
- Posts: 2613
- Joined: March 23rd, 2015, 5:26 pm
Re: Happy Birthday Smurfier!
t = {'Happy', 'Birthday', 'Smurfier'}
print( table.tostring( t ) )
print( table.tostring( t ) )
Code: Select all
function table.val_to_str ( v )
if "string" == type( v ) then
v = string.gsub( v, "\n", "\\n" )
if string.match( string.gsub(v,"[^'\"]",""), '^"+$' ) then
return "'" .. v .. "'"
end
return '"' .. string.gsub(v,'"', '\\"' ) .. '"'
else
return "table" == type( v ) and table.tostring( v ) or
tostring( v )
end
end
function table.key_to_str ( k )
if "string" == type( k ) and string.match( k, "^[_%a][_%a%d]*$" ) then
return k
else
return "[" .. table.val_to_str( k ) .. "]"
end
end
function table.tostring( tbl )
local result, done = {}, {}
for k, v in ipairs( tbl ) do
table.insert( result, table.val_to_str( v ) )
done[ k ] = true
end
for k, v in pairs( tbl ) do
if not done[ k ] then
table.insert( result,
table.key_to_str( k ) .. "=" .. table.val_to_str( v ) )
end
end
return table.concat( result, " " ) .. "!"
end
-
- Posts: 332
- Joined: December 8th, 2016, 6:45 am