Skip to content
This repository was archived by the owner on Apr 27, 2023. It is now read-only.
This repository was archived by the owner on Apr 27, 2023. It is now read-only.

Enhancement: make unpack return where it stopped reading #5

Description

@EnTerr

The code i am trying to port and uses struct needs this feature of Ierusalimschy's struct.unpack:

... After the read values, this function also returns the index in s where it stopped reading, which is also where you should start to read the rest of the string.

So i added it to my copy of lua-struct, as easy as adding a line at the end:

  table.insert(vars, iterator)   --<-- one line

  return unpack(vars)

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions