Skip to content

string模块string.find关于init值为负数是描述问题 #14

Description

string的index是从1开始的,因此index为-1,实际的正index应为string.len(s),而不是string.len(s)+init (string.len(s)+(-1))
应该写成string.len(s)+init+1

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions