Title: Fix string.find and string.match from unexpected explosions by jordan4ibanez · Pull Request #86 · TypeScriptToLua/lua-types · GitHub
Open Graph Title: Fix string.find and string.match from unexpected explosions by jordan4ibanez · Pull Request #86 · TypeScriptToLua/lua-types
X Title: Fix string.find and string.match from unexpected explosions by jordan4ibanez · Pull Request #86 · TypeScriptToLua/lua-types
Description: I was reading the documentation for string.find and I noticed that in it's own documentation it reads: /** * Looks for the first match of pattern (see §6.4.1) in the string s. If it * finds a match, then find returns the indices of s where this occurrence * starts and ends; otherwise, it returns nil. * / I see the definition defined as: function find( s: string, pattern: string, init?: number, plain?: boolean ): LuaMultiReturn<[number, number, ...string[]] | []> ; Perhaps the easiest solution for this would be to simply add optional return parameters as follows: function find( s: string, pattern: string, init?: number, plain?: boolean ): LuaMultiReturn<[number?, number?, ...string[]] | []> ; So this way, at least you know it might explode instead of blindly walking into an explosion. Also: I noticed that string.match could also blow up so I threw that in there.
Open Graph Description: I was reading the documentation for string.find and I noticed that in it's own documentation it reads: /** * Looks for the first match of pattern (see §6.4.1) in the string s. If it * finds...
X Description: I was reading the documentation for string.find and I noticed that in it's own documentation it reads: /** * Looks for the first match of pattern (see §6.4.1) in the string s. If it * f...
Opengraph URL: https://github.com/TypeScriptToLua/lua-types/pull/86
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:96cc4b17-bd75-7c12-3b50-48033f047e81 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 96CE:94987:120FB7E:19705DB:697234F8 |
| html-safe-nonce | eaaaa73c2b710371d569c040ee6e8c463454da29cab7f71359c63ae28ed65db4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkNFOjk0OTg3OjEyMEZCN0U6MTk3MDVEQjo2OTcyMzRGOCIsInZpc2l0b3JfaWQiOiI0Mzg2MDkzODEyMTYxODUyNjY0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 47c53f447b085f4e05686801fa323add96cafcb7a798f368d9f9d2729231cf60 |
| hovercard-subject-tag | pull_request:2603707152 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/TypeScriptToLua/lua-types/pull/86/files |
| twitter:image | https://avatars.githubusercontent.com/u/1088750?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1088750?s=400&v=4 |
| og:image:alt | I was reading the documentation for string.find and I noticed that in it's own documentation it reads: /** * Looks for the first match of pattern (see §6.4.1) in the string s. If it * finds... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2c16db4e575031f6e3be03e0437c1ab663e0b4643ba5cbbfba48c1e4fc056a11 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/TypeScriptToLua/lua-types git https://github.com/TypeScriptToLua/lua-types.git |
| octolytics-dimension-user_id | 44121206 |
| octolytics-dimension-user_login | TypeScriptToLua |
| octolytics-dimension-repository_id | 116213653 |
| octolytics-dimension-repository_nwo | TypeScriptToLua/lua-types |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 116213653 |
| octolytics-dimension-repository_network_root_nwo | TypeScriptToLua/lua-types |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a12ab519e1537fa080535ea933f81d4fcef34da0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width