Skip to content

Commit 535c8b3

Browse files
committed
updated create_string
1 parent 08c66ef commit 535c8b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ enum class color
5050

5151
[[nodiscard]] inline std::string create_string(std::string_view sv, std::size_t drop_chars = 0)
5252
{
53-
return std::string(sv.begin(), sv.size() - drop_chars);
53+
return std::string(sv.substr(0, sv.size() - drop_chars));
5454
}
5555
[[nodiscard]] inline std::string create_string(std::string_view begin,
5656
std::string_view end)

0 commit comments

Comments
 (0)