Commit Graph

128 Commits

Author SHA1 Message Date
Danil Alexeev d4555ef5fb
Add `String.to_{camel,pascal,snake}_case` methods 2022-08-30 12:36:24 +03:00
Aaron Franke 10a56981dc
Rename String `plus_file` to `path_join` 2022-08-29 19:38:13 -05:00
Andy Maloney 28e66882e5 [doc] Fix grammar in class docs: amount vs. number
Number is used for things that can be counted (discrete items - think "integer" in this context).

Also fixes a couple of awkward phrases.
2022-08-17 19:51:17 -04:00
Andy Maloney 1f72f48361 [doc] Use "param" instead of "code" to refer to parameters #3 2022-08-09 22:00:19 -04:00
Yuri Sizov c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
Tom 39233c299c updated the String class with info about the 'allow_empty' optional argument 2022-08-05 23:10:16 +01:00
Haoyu Qiu 25c7f567dd Improve String.format() documentation 2022-06-27 11:29:44 +08:00
Haoyu Qiu 6f38c21253 Fix parameter name for String.left and String.right 2022-06-12 16:34:44 +08:00
nova++ 05718796db
Fixing some of my own typos...
(and a little improvement to wording that was bugging me)
2022-03-31 14:20:37 -04:00
Rémi Verschelde e7fd0ec31f doc: Fix String.rsplit code example
Fixes #36898.
Supersedes and closes #36951.
2022-03-26 15:05:05 +01:00
bruvzg f19cd44346
Unify TextServer built-in module and GDExtension code. 2022-03-17 08:15:29 +02:00
Yuri Roubinsky 32f2c47356 Remove generating of null comparison operators from documentation 2022-03-14 22:35:23 +03:00
Nova f159e7e5ab Added or improved documentation to a few more String methods 2022-02-23 10:50:33 -05:00
Nova b2b2e0606f Document String's humanize_size static method 2022-02-22 13:12:29 -05:00
Markus Sauermann 70ae6c21de Update doc for match: empty argument doesn't match anything 2022-02-21 09:37:29 +01:00
Hugo Locurcio b68dd2e189
Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
Hugo Locurcio 08541fe11d
Clarify identical `hash()` return values due to collisions 2022-02-12 22:21:37 +01:00
bruvzg b801742b77
[GDExtension] Add binds for missing methods, operators, and constants required for GDExtension TextServer implementation. 2022-02-08 09:49:14 +02:00
Anilforextra adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Wilson E. Alvarez 3eb5e0ac50
Rename String::is_subsequence_ofi to String::is_subsequence_ofn 2022-01-26 18:03:56 -05:00
kobewi 7bb682651f Clarify to_float() and to_int() methods 2022-01-17 16:44:07 +01:00
kobewi 2cad775461 Fix usage of "Return" in the docs 2022-01-02 21:09:18 +01:00
Haoyu Qiu e4e4e475f8 Make `--doctool` locale aware
* Adds `indent(str)` to `String`:
    * Indent the (multiline) string with the given indentation.
    * This method is added in order to keep the translated XML correctly
      indented.
* Moves the loading of tool/doc translation into
  `editor/editor_translation.{h,cpp}`.
    * This will be used from both `EditorSettings` and the doc tool from
      `main`.
* Makes use of doc translation when generating XML class references, and
  setup the translation locale based on `-l LOCALE` CLI parameter.

The XML class reference won't be translated if `-l LOCALE` parameter is
not given, or when it's `-l en`.
2021-12-16 17:49:22 +08:00
Rémi Verschelde 6c1bd4d227
Replace Godot docs URL with `$DOCS_URL` in XML class reference 2021-11-15 13:02:21 +01:00
Rémi Verschelde ab6ec9310c
Merge pull request #54453 from KoBeWi/slice_of_string 2021-11-02 13:18:34 +01:00
kobewi e5725c7deb Expose String.get_slice 2021-11-02 11:24:07 +01:00
Aaron Franke 6772ebcea0
Move the docs for constructors and operators out of methods section 2021-10-29 12:34:57 -05:00
Raul Santos baa83012ef
Fix `bin_to_int` documentation examples
The `bin_to_int` method uses the `0b` prefix.
2021-10-22 01:57:34 +02:00
Rémi Verschelde 862994a8ef
doc: Update links to latest documentation after content reorganization 2021-10-06 13:48:48 +02:00
Aaron Franke d54f2ad7ca
Don't generate empty doc sections and reduce code duplication 2021-09-20 20:59:33 -05:00
George Marques 262d9397fb
Allow indexing of String values in scripting languages 2021-09-17 16:24:56 -03:00
George Marques 455e142d37
Allow comparing equality between builtin types and null 2021-09-17 12:33:52 -03:00
Wilson E. Alvarez d11c1afc04
Rename String::is_rel_path to String::is_relative_path 2021-08-29 20:41:29 -04:00
Max Hilbrunner 7e0f1fa2ec
Merge pull request #52041 from Rubonnek/expose-simplify-path
Expose `String.simplify_path`
2021-08-24 17:06:16 +02:00
Wilson E. Alvarez 17821603b4
Expose String.simplify_path 2021-08-24 00:48:45 -04:00
Wilson E. Alvarez 69caa1ab4c
Update documentation for is_absolute_path and is_rel_path 2021-08-23 19:55:06 -04:00
Hugo Locurcio 09eb98c530
Improve documentation for `String.get_extension()` 2021-08-20 03:07:15 +02:00
Rémi Verschelde 066dbc2f0c
String: Fix default decimals truncation in num and num_real
Fixes undefined behavior, and fixes the logic for negative powers of ten.
Fixes #51764.

Adds tests to validate the changes and prevent regressions.
Adds docs for `String.num`.
2021-08-18 00:48:03 +02:00
follower b85688ac7d
Fix Unicode URL link tags to render correctly.
Change incorrect `[/code]` closing tags to `[/url]` tags.

The `url` tags for the links to the Unicode code points information use `[/code]` rather than `[/url]` to close them.

This results in the links being rendered incorrectly in the IDE--the entire rest of the documentation for each method gets turned into a giant underlined link.

This issue was introduced in a2271ba3bd.
2021-08-08 15:10:17 +12:00
Rémi Verschelde 7adf4cc9b5
doc: Use self-closing tags for `return` and `argument`
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
Lightning_A b6af2a29eb Rename `is_valid_integer()` to `is_valid_int()`
Method from `String`
2021-06-16 10:32:22 -06:00
Hugo Locurcio 5ea1c75d63
Rename `String.is_abs_path()` to `String.is_absolute_path()`
This is more consistent with `NodePath.is_absolute()`.
2021-06-03 16:00:06 +02:00
Tomasz Chabora b1859510ab Change behavior of String.right 2021-05-20 23:07:57 +02:00
Rémi Verschelde 4ca1e73ff9
doc: Sync classref with current source
And move GLTF docs to its module folder.
2021-03-18 16:37:43 +01:00
Rémi Verschelde 83b1acdc60
Merge pull request #45545 from abaire/relaxes_gltf_name_sanitization
Relaxes node name sanitization in gltf documents.
2021-03-09 14:54:33 +01:00
HaSa1002 bae843a1c9
Docs: Port Code Examples to C# (R, S, T, U)
* RenderingServer
 * RichTextEffect
 * SceneTree
 * SceneTreeTimer
 * ScriptCreateDialog
 * SpinBox
 * Sprite2D
 * StreamPeer
 * String
 * SurfaceTool
 * TextEdit
 * TileMap
 * Tree
 * Tween
 * UDPServer
 * UndoRedo

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2021-03-05 18:57:28 +01:00
abaire 61cc1c8624 Relaxes Node naming constraints in glTF documents to match the Editor. 2021-02-24 08:22:27 -08:00
Aaron Franke e829b7aee4
Unify URI encoding/decoding and add to C#
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-28 07:45:01 -05:00
Aaron Franke a3e3bf8227
Make hex_to_int and bin_to_int handle the prefix automatically
Also add BinToInt to C#
2021-01-28 07:43:53 -05:00
Yuri Roubinsky 38a5d22079 Renamed String.ord_at to unicode_at 2021-01-26 20:36:12 +03:00