Commit Graph

64 Commits

Author SHA1 Message Date
ca4b29b18d Standardize all "Prints" comments in documentation 2024-12-23 21:26:00 +01:00
072ff85f82 [.NET] Use collection expressions in docs
As of C# 12 we can now use collection expressions to reduce some boilerplate when initializing collections.
2024-12-21 02:28:59 +01:00
4146bcc0dc Merge pull request #99089 from Mickeon/documentation-truth-csharp-rabbit-hoole
Fix C# boolean "Prints" comments in documentation
2024-12-11 17:35:30 -06:00
2d855f2955 Fix format description being different between String and StringName 2024-11-13 18:26:16 +01:00
6d08005ddb Merge pull request #95758 from Mickeon/documentation-no-differences-String
Fix differences between String and StringName's documentation
2024-11-12 09:27:36 -06:00
0c2296fb1b Fix C# boolean "Prints" comments in documentation 2024-11-11 21:19:34 +01:00
90aad071f5 Remove outdated note about not operator with String and StringName 2024-09-16 21:51:18 +09:30
8bf4ecc026 Add String.is_valid_unicode_identifier()
- Adds `is_valid_unicode_identifier()`
- Adds `is_valid_ascii_identifier()`
- Deprecates `is_valid_identifier()`
- Renames `validate_identifier()` to `validate_ascii_identifier()`
2024-08-27 11:34:08 +08:00
4ce5856384 Remove empty [b]Example:[/b] lines from the class reference 2024-08-19 01:00:52 +02:00
519351f677 Fix differences between String and StringName's documentation 2024-08-18 18:26:29 +02:00
b4c6cc7d82 [Core] Add case-insensitive String::containsn 2024-05-08 12:48:01 +02:00
4b070e8031 Fix various typos with codespell
Using 2.2.7.dev217+g10c2abcf.

Had to add `colour` to the ignore list as we used it as an alias/keyword for the
documentation of color-related APIs.
Also ignore recommendations to change `thirdparty` to either `third-party` or
`third party`, which are correct but we use the former fairly consistently.
2024-05-07 10:08:42 +02:00
d0af8901aa Add a note for String::reverse to warn about its implementation 2024-04-30 12:33:28 +03:00
2cbf469912 Fix sorting of files/dirs in dialogs
Sorts leading `_` before other characters except `.`.
2024-03-20 13:45:47 +01:00
f781571d07 Add keywords to improve search in the class reference 2024-02-22 16:16:49 +01:00
158df3e7b9 Merge pull request #79815 from idbrii/patch-2
doc: Clarify when to construct a StringName ahead of time
2024-02-09 12:13:07 +01:00
9cbc4026ee doc: Clarify when to construct a StringName ahead of time
Fix docs don't give justification for manual construction.

Clarify how to apply manual StringName construction as an
optimization and that "string intern" means "work at parse time".

There are several godot-demo-projects (including 3d/platformer) that
incorrectly use StringName literals (they use & literals instead of just
passing strings), so clearly this is confusing.

AThousandShips did a disassembly test to prove it automatically converts
constant strings to StringName for annotated functions:

  func do_test(_var: StringName, _var2: String):
  pass

  func test():
  do_test("abc", "def")

Yields:

  Disassembling do_test(_var, _var2)
   0: line 2:     pass
   2: == END ==

  Disassembling test()
   0: line 5:     do_test("abc", "def")
   2: call self.do_test(const(&"abc"), const("def"))
   10: assign stack(3) = false
   12: == END ==

It also happens with built-in functions such as those of Input.
2024-02-09 12:08:12 +01:00
339a793fa2 Merge pull request #86639 from Mickeon/please-this-took-me-15-minutes-can-we-merge-it-before-2025
Fixing few reports to String's documentation
2024-01-11 17:38:35 +01:00
46b0f3e9d6 Fixing some reports to String's documentation
Closes https://github.com/godotengine/godot-docs/issues/8043
Closes https://github.com/godotengine/godot-docs/issues/8044
Mitigates https://github.com/godotengine/godot-docs/issues/8190
Closes https://github.com/godotengine/godot/issues/86734
2024-01-10 12:21:08 +01:00
d3e7b8c8a8 Fix various typos in documentation 2024-01-05 15:47:58 +07:00
20e24bd2bb Merge pull request #78529 from Chaosus/string_reverse
Add `String.reverse` method
2023-08-16 16:53:40 +02:00
81064cc239 Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
346f1ab86b Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02:00
470083caed Fix import hints that are followed by dot.number.
Fixes #78881.
2023-07-05 14:49:53 +02:00
230385b587 Add String.reverse method 2023-06-21 20:40:48 +03:00
18fa7cf967 Mention that the not operator cannot be used with Strings and StringNames 2023-05-30 11:33:17 +02:00
b4ac381f30 Merge pull request #77609 from RedworkDE/class-ref-code-fixes
Fix more issues with code tags in class reference
2023-05-29 17:37:16 +02:00
490a76edc8 Merge pull request #76526 from MewPurPur/improve-docs-top-sections-CORE
Overhaul the top sections of the class reference (Core classes)
2023-05-29 17:08:40 +02:00
42ca35cfd7 Fix more issues with code tags in class reference 2023-05-29 15:46:34 +02:00
809a982162 Merge pull request #77247 from Piralein/nohashforyou
Fix C# code examples in `String` and `StringName`
2023-05-19 19:48:06 +02:00
85e1fc2681 fix c# code example 2023-05-19 17:53:54 +02:00
04562662d3 Overhaul the top sections of the class reference (Core classes) 2023-05-19 07:04:48 +02:00
2f9121dea6 Accurately document StringName comparisons 2023-05-18 18:44:28 +02:00
6bccdec7a1 Make documentation sorting use natural order 2023-05-09 17:47:52 +02:00
5ade250c7d Merge pull request #76735 from AThousandShips/natural_cmp
Add `naturalcasecmp_to` function to `String`
2023-05-09 17:44:37 +02:00
46a7018e3c Add naturalcasecmp_to function to String
Functions as a complement to `naturalnocasecmp_to`
2023-05-07 10:17:53 +02:00
6fa4f71ca6 Reimplement String.erase 2023-05-04 00:52:35 +02:00
ca0feabbb0 add hex_decode() to String 2023-04-05 19:44:00 +07:00
d72b563250 Add GDScript to_wchar_buffer and get_string_from_wchar functions. 2023-03-21 15:39:54 +02:00
1c1524a651 Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
b2584629c8 Merge pull request #73195 from timothyqiu/weblate-comments
Improvements and fixes based on Weblate comments
2023-02-17 09:55:39 +01:00
edb78840c0 Add missing documentation for String & StringName
Also fixes typos brought up in #69821's replies.
2023-02-14 10:15:44 +01:00
84aee17901 Improvements and fixes based on Weblate comments
* Description of `ui_text_submit` action should be "Submit Text" instead of "Text Submitted".
* Spell out "Animation" instead of using "Anim.".
* Treat "Max" as regular word instead of writing "Max.".
* Use generic "Set %s" for action name instead of a dedicated "Set target_position".
* Add translator comment for:
    * "Inclusive" and "Self" in the profiler.
    * Places where it needs the context about being an editor progress label.
    * "Duplicated Animation Name" since it's refering to the new name of a duplicated animation.
    * Disambiguation of "View Plane Transform", "Paste Selects" and "Display Normal".
* Fix wrong undo action name for renaming an input action.
* Fix missing end quote in a shader error message.
* In class reference:
    * Fix duplicated "if" in the description of `signf()`.
    * Fix mismatched example output in `String.operator %()`.
    * Fix typo in the description of `Decal.texture_emission`.
    * Unify description of `String.match()` and `StringName.match()`.
2023-02-13 15:22:18 +08:00
518b9e5801 Add missing classref changes after #62942 2023-01-27 12:07:53 +01:00
346efd29e0 Fix typos with codespell 2022-12-15 12:24:08 +01:00
3afe5d0c25 Fix docstring for String.get_base_dir 2022-12-12 13:12:25 -05:00
45e991fdc2 Update StringName documentation to match String's 2022-12-09 20:03:40 +01:00
e79be6ce07 Unify String and StringName 2022-12-05 21:46:47 -05:00
c164f1835c Add missing String & StringName operator descriptions 2022-11-23 18:56:39 +01:00
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00