Script | Luar

Script | Luar

The Association for Short-Term Rental Homeowners (ASTRHO) is a free to join, not-for-profit professional network for all short-term and vacation rental homeowners. We’ve built this community so that we can solve problems, make homeownership easier and more profitable, strengthen our collective knowledge, and support the safe, legal, and successful advancement of the short-term and vacation rental segment within the overall lodging industry.

-- Log with timestamp function debug_utils.log(message, level) level = level or "INFO" local timestamp = os.date("%Y-%m-%d %H:%M:%S") print(string.format("[%s] [%s] %s", timestamp, level, message)) end

-- Split string by delimiter (returns table) function string_utils.split(str, delimiter) local result = {} local pattern = string.format("([^%s]+)", delimiter) for match in str:gmatch(pattern) do table.insert(result, match) end return result end

-- Trim whitespace from both ends function string_utils.trim(str) return str:match("^%s*(.-)%s*$") end

-- -------------------------------------------- -- 6. EXAMPLE USAGE (commented out) -- -------------------------------------------- --[[ local my_string = " hello world " print(string_utils.trim(my_string)) --> "hello world" local parts = string_utils.split("a,b,c", ",") --> {"a","b","c"}

-- Merge table t2 into t1 (overwrites t1 keys) function table_utils.merge(t1, t2) for k, v in pairs(t2) do t1[k] = v end return t1 end

-- Print table recursively (for debugging) function table_utils.print_table(tbl, indent) indent = indent or 0 for k, v in pairs(tbl) do local formatting = string.rep(" ", indent) .. tostring(k) .. ": " if type(v) == "table" then print(formatting) table_utils.print_table(v, indent + 1) else print(formatting .. tostring(v)) end end end

We Bring Resources, Education and a Community together to Master Vacation Rental Home Ownership

Join us for FREE today and get access to a protected community, live courses, and a network of peers. For less than $10 a month, you can take full advantage of our Premier Hosts group which includes additional resources to help your business thrive. As a not-for-profit, this revenue pays for ASTRHO’s basic resources and technology solutions, and supports the creation of industry foundations to help you, the homeowner.

Access to a nationwide collaborative community

Resources, guides and educational content

Collective homeowner perks and discounts

Educational courses lead by industry professionals

script luar

Your source for the latest and greatest in vacation rental news, trends and more.

Sign up for the weekly newsletter.

Vacation Rental Resources

Script | Luar

-- Log with timestamp function debug_utils.log(message, level) level = level or "INFO" local timestamp = os.date("%Y-%m-%d %H:%M:%S") print(string.format("[%s] [%s] %s", timestamp, level, message)) end

-- Split string by delimiter (returns table) function string_utils.split(str, delimiter) local result = {} local pattern = string.format("([^%s]+)", delimiter) for match in str:gmatch(pattern) do table.insert(result, match) end return result end script luar

-- Trim whitespace from both ends function string_utils.trim(str) return str:match("^%s*(.-)%s*$") end -- Log with timestamp function debug_utils

-- -------------------------------------------- -- 6. EXAMPLE USAGE (commented out) -- -------------------------------------------- --[[ local my_string = " hello world " print(string_utils.trim(my_string)) --> "hello world" local parts = string_utils.split("a,b,c", ",") --> {"a","b","c"} ": " if type(v) == "table" then print(formatting)

-- Merge table t2 into t1 (overwrites t1 keys) function table_utils.merge(t1, t2) for k, v in pairs(t2) do t1[k] = v end return t1 end

-- Print table recursively (for debugging) function table_utils.print_table(tbl, indent) indent = indent or 0 for k, v in pairs(tbl) do local formatting = string.rep(" ", indent) .. tostring(k) .. ": " if type(v) == "table" then print(formatting) table_utils.print_table(v, indent + 1) else print(formatting .. tostring(v)) end end end

Join our growing community of Short-Term Rental Professionals

Members
750 +
Subscribers
3000 +
Corporate Sponsors
1 +

Why Our Members Join

Ready to join a group of Vacation Rental pros?