diff --git a/includes/std/string.pat b/includes/std/string.pat index cb37780..b2e2872 100644 --- a/includes/std/string.pat +++ b/includes/std/string.pat @@ -1,6 +1,7 @@ #pragma once import std.io; +import std.mem; /*! Libray to interact with strings. @@ -35,7 +36,8 @@ namespace auto std::string { @tparam DataType The type of the characters. */ struct NullStringBase { - DataType string[while($[$] != 0x00)]; + DataType string[while(std::mem::read_unsigned($, sizeof(DataType)) != 0x00)]; + DataType null_terminator; } [[sealed, format("std::string::impl::format_string"), transform("std::string::impl::format_string")]]; /**