Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix string.find signature #674

Closed
wants to merge 1 commit into from
Closed

Conversation

fperrad
Copy link
Contributor

@fperrad fperrad commented Jul 8, 2023

return only 2 integers as start and end position

return only 2 integers as start and end position
@github-actions
Copy link

github-actions bot commented Jul 8, 2023

Teal Playground URL: https://674--teal-playground-preview.netlify.app

@hishamhm
Copy link
Member

hishamhm commented Jul 10, 2023

From https://www.lua.org/manual/5.4/manual.html#pdf-string.find :

If the pattern has captures, then in a successful match the captured values are also returned, after the two indices.

That is why the return is of vararg type integer, integer, string...

@fperrad
Copy link
Contributor Author

fperrad commented Jul 11, 2023

sorry for the noise

@fperrad fperrad closed this Jul 11, 2023
@fperrad fperrad deleted the string.find branch July 11, 2023 05:43
@hishamhm
Copy link
Member

@fperrad no worries! thanks for giving Teal a spin!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants