Skip to content

Commit

Permalink
ObfusString: Add size & length methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Dec 19, 2024
1 parent e1294e9 commit be63f5d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions soup/ObfusString.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ NAMESPACE_SOUP
os << str.str();
return os;
}

[[nodiscard]] constexpr size_t size() const noexcept
{
return Len;
}

[[nodiscard]] constexpr size_t length() const noexcept
{
return Len;
}
};
static_assert(sizeof(ObfusString<3>) == 2 + 4);
#pragma pack(pop)
Expand Down

0 comments on commit be63f5d

Please sign in to comment.