lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hallo,

    Ok, I was stupid. This will do:

-- checks if a string is in CamelCase
function isCamelCase(str)
   local s, count = string.gsub(str, "%u%l+", "")

   if count < 2 or s ~= "" then
       return nil
   else
       return not nil
   end
end

-alex