Skip to content

Commit

Permalink
extended to 25 characters (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxodo98 authored Nov 20, 2024
1 parent 9c44a5a commit 832c6bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/utl/const_str.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ template <char... Chars>
constexpr char const const_str<Chars...>::s[sizeof...(Chars) + 1];
#endif

#define STRING_LITERAL_25(str) \
STRING_LITERAL_24(str), ((TERMINATED_24(str)) ? (str[24]) : ('\0'))
#define STRING_LITERAL_24(str) \
STRING_LITERAL_23(str), ((TERMINATED_23(str)) ? (str[23]) : ('\0'))
#define STRING_LITERAL_23(str) \
Expand Down Expand Up @@ -59,8 +61,9 @@ constexpr char const const_str<Chars...>::s[sizeof...(Chars) + 1];
#define STRING_LITERAL_2(str) \
STRING_LITERAL_1(str), ((TERMINATED_1(str)) ? (str[1]) : ('\0'))
#define STRING_LITERAL_1(str) str[0]
#define STRING_LITERAL(str) utl::const_str<STRING_LITERAL_24(str)>::s
#define STRING_LITERAL(str) utl::const_str<STRING_LITERAL_25(str)>::s

#define TERMINATED_24(str) TERMINATED_23(str) && str[23]
#define TERMINATED_23(str) TERMINATED_22(str) && str[22]
#define TERMINATED_22(str) TERMINATED_21(str) && str[21]
#define TERMINATED_21(str) TERMINATED_20(str) && str[20]
Expand Down

0 comments on commit 832c6bb

Please sign in to comment.