Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extended to 25 characters #22

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading