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

@EnTerr

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)

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