summaryrefslogtreecommitdiffstats
path: root/modules/regex/regex.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotSpartan3222024-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e8542b06acca3c1bdeee4b528411771f0819f084) Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Replace `find` with `contains/has` where applicableA Thousand Ships2024-05-081-1/+1
| | | | | | | * Replaces `find(...) != -1` with `contains` for `String` * Replaces `find(...) == -1` with `!contains` for `String` * Replaces `find(...) != -1` with `has` for containers * Replaces `find(...) == -1` with `!has` for containers
* Fix for RegEx.sub truncating string when 'end' is usedSofox2024-02-201-1/+1
|
* Fixed RegEx search_all for zero length matches/lookahead/lookbehindSofox2023-12-081-5/+7
|
* Style: Harmonize header includes in modulesRémi Verschelde2023-06-151-0/+1
| | | | | | | | | | | | | | | | | | | | This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module ("local" includes) should be listed first in their own block using relative paths, before Godot's "core" includes which use "absolute" (project folder relative) paths, and finally thirdparty includes. Includes in `#ifdef`s come after their relevant section, i.e. the overall structure is: - Local includes * Conditional local includes - Core includes * Conditional core includes - Thirdparty includes * Conditional thirdparty includes
* pcre2: Update to upstream version 10.42 (take two)Rémi Verschelde2023-06-121-1/+3
| | | | | | | Changelog: https://github.com/PCRE2Project/pcre2/blob/pcre2-10.42/ChangeLog This fixes support for RISC-V architectures in the sljit library, so we enable the module's compilation for `rv64` too.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Unify String and StringNamerune-scape2022-12-051-2/+1
|
* Change Array arguments to TypedArraykobewi2022-09-011-2/+2
|
* Replace Array return types with TypedArraykobewi2022-08-221-2/+2
|
* Add static method for creating RegExkobewi2022-08-021-2/+11
|
* Generate error if RegEx offset is negativeMarcel Admiraal2022-07-291-0/+4
|
* Replace most uses of Map by HashMapreduz2022-05-161-4/+4
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Initialize class/struct variables with default values in modules/Rafał Mikrut2021-02-081-2/+0
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-168/+61
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-17/+34
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-48/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Replace NULL with nullptrlupoDharkael2020-04-021-13/+13
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Assign pointer null in RegEx::clear to avoid double free on destruction.Ibrahn Sahir2018-11-151-2/+6
|
* Fixes several resource leaks in ...Crazy-P2018-08-261-0/+6
| | | | | | | | - gdscript - gdscript_compiler - regex - android/export - gles3/rasterizer (scene and storage)
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Bind many more properties to scriptsBojidar Marinov2018-01-121-0/+4
| | | | | | | Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
* Fixes RegEx::sub injecting null character (issue 15409)Bernhard Liebl2018-01-071-11/+16
|
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Added RegEx.search_all() for multiple matchesZher Huei Lee2017-11-141-0/+16
| | | | And updated the docs
* Fix signed and unsigned comparisonsHein-Pieter van Braam2017-09-011-3/+3
| | | | The first in my quest to make Godot 3.x compile with -Werror on GCC7
* Merge pull request #10148 from leezh/pcre2Rémi Verschelde2017-08-311-1285/+275
|\ | | | | Replacement of internal RegEx with PCRE2
| * Replacement of internal RegEx with PCRE2Zher Huei Lee2017-08-191-1285/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pattern and replacement matching behaviour has been changed purely due to the nature of switching to a standards-compliant library. One mistake in the previous behaviour was that named groups didn't have a number. This has been corrected. As names are actually just an alias of numbered groups, RegExMatch::get_name_dict() is now get_names() and is a dict referring to the group number it represents. Duplicate names are enabled and the with the first matching instance used. Due the lack of a suitable equivalent in PCRE2, RegExMatch::expand() was removed.
* | Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|/
* Removes type information from method bindsIgnacio Etcheverry2017-08-101-1/+1
|
* Revert "Revert "Fixed RegEx::search missing return type hint""Rémi Verschelde2017-06-261-1/+1
|
* Revert "Fixed RegEx::search missing return type hint"Juan Linietsky2017-06-261-1/+1
|
* Merge pull request #9379 from leezh/regex_bind_fixRémi Verschelde2017-06-261-1/+1
|\ | | | | Fixed RegEx::search missing return type hint
| * Fixed RegEx::search missing return type hintZher Huei Lee2017-06-261-1/+1
| |
* | Fixed inverted group thrown off by quantifiersZher Huei Lee2017-06-261-3/+4
| |
* | Fixes RegEx capture grabbing too much #9382Zher Huei Lee2017-06-261-6/+13
|/ | | | | Incorrect behaviour was caused when next->test was throwing off the results.
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-235/+226
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Various fixes detected using PVS-Studio static analyzer.Thaer Razeq2017-02-281-1/+1
| | | | | | | - Add FIXME tags comments to some unfixed potential bugs - Remove some checks (always false: unsigned never < 0) - Fix some if statements based on reviews. - Bunch of missing `else` statements
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-16/+16
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Remove use of _SCS from ADD_METHODHein-Pieter van Braam2017-02-131-1/+1
| | | | This saves typing and is a step towards fixing #56
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-16/+16
| | | | | | | | Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* Make regex compilable with RTTI disabledPedro J. Estébanez2016-11-011-4/+9
|
* Changed RegEx to inherit ResourceZher Huei Lee2016-10-271-2/+6
|