Skip to content

Instantly share code, notes, and snippets.

View MarioLiebisch's full-sized avatar

Mario Liebisch MarioLiebisch

View GitHub Profile
@texus
texus / toLower.cpp
Last active June 18, 2024 06:19
String to lowercase at compile time with with c++14
// This file contains code on how to convert a string to lowercase at compile time.
// A large part of the imlementation was taken from http://stackoverflow.com/a/15912824/3161376 which solved the problems that I had in the old implementation.
// The string struct will hold our data
// The declaration of our string struct that will contain the character array
template<char... str>
struct string
{
// The characters are immediately converted to lowercase when they are put in the array