Skip to content

建议增加 getString 方法 #4

Open

Description

@abevol
    std::string getString(uint32_t len)
    {
        std::string result((char*)p_buffer_ + position_, len);
        position_ += len;
        return result;
    }
    std::string getString(uint32_t index, uint32_t len) const
    {
        return {p_buffer_ + index, p_buffer_ + index + len};
    }

Activity

  1. webbrain-one commented on Aug 22, 2026

    @webbrain-one

    Hi! I’ve opened a PR to add the getString methods suggested in #4. It resolves the issue by allowing std::string reads from the current buffer position and from a specified index/length. Please review: #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions