/* ==================================== JUCER_BINARY_RESOURCE ====================================

   This is an auto-generated file: Any edits you make may be overwritten!

*/

#include <cstring>

namespace mods
{

//================== strings.lua ==================
static const unsigned char temp_binary_data_6[] =
"--- A Lua module for basic string manipulation.\n"
"-- Provides utilities for trimming, splitting, and converting string cases.\n"
"-- @module el.strings\n"
"\n"
"local M = {}\n"
"\n"
"--- Convert a string to camel case.\n"
"--\n"
"-- @string str The input string to convert\n"
"-- @treturn string The input converted to camel case.\n"
"function M.tocamel (str)\n"
"    return string.gsub (tostring(str), \"_%a+\", function (word)\n"
"        local first = string.sub (word, 2, 2)\n"
"        local rest = string.sub (word, 3)\n"
"        return string.upper (first) .. rest\n"
"    end)\n"
"end\n"
"\n"
"--- Convert a string to snake case.\n"
"--\n"
"-- @string str The input string to convert\n"
"-- @treturn string The input converted to snake case.\n"
"function M.tosnake (str)\n"
"    return string.gsub (tostring (str), \"%u\", function (c)\n"
"        return \"_\" .. string.lower (c)\n"
"    end)\n"
"end\n"
"\n"
"--- Checks if a string is a valid slug.\n"
"--\n"
"-- For example: allowed a-z, A-Z, 0-9, -, and _ (no spaces). This is a relaxed\n"
"-- version of @{issymbol} where `-` is allowed.\n"
"--\n"
"-- @string str The string to check\n"
"-- @return True if a valid slug.\n"
"function M.isslug (str)\n"
"    if string.len (string.gsub (string.sub (str, 1, 1), \"[%a_]\", \"\")) > 0 then\n"
"        return false\n"
"    end\n"
"    return string.len (string.gsub (tostring (str), \"[%a%d_]\", \"\")) == 0\n"
"end\n"
"\n"
"--- Check if a string is a valid symbol.\n"
"--\n"
"-- The first character of a symbol must be one of _, a-z or A-Z, and subsequent \n"
"-- characters may additionally be 0-9. This is, among other things, a valid C \n"
"-- identifier, and generally compatible in most contexts which have restrictions\n"
"-- on string identifiers, such as file paths.\n"
"--\n"
"-- @string str The string to check\n"
"-- @return True is the string is a valid symbol.\n"
"function M.issymbol (str)\n"
"    if string.len (string.gsub (string.sub (str, 1, 1), \"[%a_]\", \"\")) > 0 then\n"
"        return false\n"
"    end\n"
"    return string.len (string.gsub (tostring (str), \"[%a%d_]\", \"\")) == 0\n"
"end\n"
"\n"
"return M\n"
"\n"
"-- SPDX-FileCopyrightText: Copyright (C) Kushview, LLC.\n"
"-- SPDX-License-Identifier: GPL-3.0-or-later\n";

const char* strings_lua = (const char*) temp_binary_data_6;
}
