feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -112,7 +112,7 @@
|
|||
<param index="0" name="to" type="String" />
|
||||
<description>
|
||||
Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "Less than" and "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order.
|
||||
With different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].
|
||||
If the character comparison reaches the end of one string, but the other string contains more characters, then it will use length as the deciding factor: [code]1[/code] will be returned if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is always [code]0[/code].
|
||||
To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to], [method filecasecmp_to], and [method naturalcasecmp_to].
|
||||
</description>
|
||||
</method>
|
||||
|
|
@ -367,12 +367,12 @@
|
|||
[gdscript]
|
||||
var text = "hello world"
|
||||
var encoded = text.to_utf8_buffer().hex_encode() # outputs "68656c6c6f20776f726c64"
|
||||
print(buf.hex_decode().get_string_from_utf8())
|
||||
print(encoded.hex_decode().get_string_from_utf8())
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var text = "hello world";
|
||||
var encoded = text.ToUtf8Buffer().HexEncode(); // outputs "68656c6c6f20776f726c64"
|
||||
GD.Print(buf.HexDecode().GetStringFromUtf8());
|
||||
GD.Print(encoded.HexDecode().GetStringFromUtf8());
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
|
|
@ -651,7 +651,7 @@
|
|||
<description>
|
||||
Performs a [b]case-sensitive[/b], [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "Less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order.
|
||||
When used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be [code]["1", "2", "3", ...][/code], not [code]["1", "10", "2", "3", ...][/code].
|
||||
With different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].
|
||||
If the character comparison reaches the end of one string, but the other string contains more characters, then it will use length as the deciding factor: [code]1[/code] will be returned if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is always [code]0[/code].
|
||||
To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method naturalnocasecmp_to], [method filecasecmp_to], and [method nocasecmp_to].
|
||||
</description>
|
||||
</method>
|
||||
|
|
@ -661,7 +661,7 @@
|
|||
<description>
|
||||
Performs a [b]case-insensitive[/b], [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "Less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison.
|
||||
When used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be [code]["1", "2", "3", ...][/code], not [code]["1", "10", "2", "3", ...][/code].
|
||||
With different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].
|
||||
If the character comparison reaches the end of one string, but the other string contains more characters, then it will use length as the deciding factor: [code]1[/code] will be returned if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is always [code]0[/code].
|
||||
To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method naturalcasecmp_to], [method filenocasecmp_to], and [method casecmp_to].
|
||||
</description>
|
||||
</method>
|
||||
|
|
@ -670,7 +670,7 @@
|
|||
<param index="0" name="to" type="String" />
|
||||
<description>
|
||||
Performs a [b]case-insensitive[/b] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "Less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison.
|
||||
With different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].
|
||||
If the character comparison reaches the end of one string, but the other string contains more characters, then it will use length as the deciding factor: [code]1[/code] will be returned if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is always [code]0[/code].
|
||||
To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to], [method filenocasecmp_to], and [method naturalnocasecmp_to].
|
||||
</description>
|
||||
</method>
|
||||
|
|
@ -727,7 +727,7 @@
|
|||
GD.Print(n.ToString("e1")); // Prints -5.2e+008
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
[b]Note:[/b] In C#, this method is not implemented. To achieve similar results, see C#'s [url=https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings]Standard numeric format strings[/url]
|
||||
[b]Note:[/b] In C#, this method is not implemented. To achieve similar results, see C#'s [url=https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings]Standard numeric format strings[/url].
|
||||
</description>
|
||||
</method>
|
||||
<method name="num_uint64" qualifiers="static">
|
||||
|
|
@ -763,6 +763,20 @@
|
|||
[b]Example:[/b] [code]"this/is".path_join("path") == "this/is/path"[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_char" qualifiers="const">
|
||||
<return type="String" />
|
||||
<param index="0" name="what" type="int" />
|
||||
<description>
|
||||
Removes all occurrences of the Unicode character with code [param what]. Faster version of [method replace] when the key is only one character long and the replacement is [code]""[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_chars" qualifiers="const">
|
||||
<return type="String" />
|
||||
<param index="0" name="chars" type="String" />
|
||||
<description>
|
||||
Removes any occurrence of the characters in [param chars]. See also [method remove_char].
|
||||
</description>
|
||||
</method>
|
||||
<method name="repeat" qualifiers="const">
|
||||
<return type="String" />
|
||||
<param index="0" name="count" type="int" />
|
||||
|
|
@ -778,6 +792,22 @@
|
|||
Replaces all occurrences of [param what] inside the string with the given [param forwhat].
|
||||
</description>
|
||||
</method>
|
||||
<method name="replace_char" qualifiers="const">
|
||||
<return type="String" />
|
||||
<param index="0" name="key" type="int" />
|
||||
<param index="1" name="with" type="int" />
|
||||
<description>
|
||||
Replaces all occurrences of the Unicode character with code [param key] with the Unicode character with code [param with]. Faster version of [method replace] when the key is only one character long. To get a single character use [code]"X".unicode_at(0)[/code] (note that some strings, like compound letters and emoji, can be made up of multiple unicode codepoints, and will not work with this method, use [method length] to make sure).
|
||||
</description>
|
||||
</method>
|
||||
<method name="replace_chars" qualifiers="const">
|
||||
<return type="String" />
|
||||
<param index="0" name="keys" type="String" />
|
||||
<param index="1" name="with" type="int" />
|
||||
<description>
|
||||
Replaces any occurrence of the characters in [param keys] with the Unicode character with code [param with]. See also [method replace_char].
|
||||
</description>
|
||||
</method>
|
||||
<method name="replacen" qualifiers="const">
|
||||
<return type="String" />
|
||||
<param index="0" name="what" type="String" />
|
||||
|
|
@ -1010,12 +1040,41 @@
|
|||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="to_kebab_case" qualifiers="const">
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the string converted to [code]kebab-case[/code].
|
||||
[b]Note:[/b] Numbers followed by a [i]single[/i] letter are not separated in the conversion to keep some words (such as "2D") together.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
"Node2D".to_kebab_case() # Returns "node-2d"
|
||||
"2nd place".to_kebab_case() # Returns "2-nd-place"
|
||||
"Texture3DAssetFolder".to_kebab_case() # Returns "texture-3d-asset-folder"
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
"Node2D".ToKebabCase(); // Returns "node-2d"
|
||||
"2nd place".ToKebabCase(); // Returns "2-nd-place"
|
||||
"Texture3DAssetFolder".ToKebabCase(); // Returns "texture-3d-asset-folder"
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
</method>
|
||||
<method name="to_lower" qualifiers="const">
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the string converted to [code]lowercase[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="to_multibyte_char_buffer" qualifiers="const">
|
||||
<return type="PackedByteArray" />
|
||||
<param index="0" name="encoding" type="String" default="""" />
|
||||
<description>
|
||||
Converts the string to system multibyte code page encoded [PackedByteArray]. If conversion fails, empty array is returned.
|
||||
The values permitted for [param encoding] are system dependent. If [param encoding] is empty string, system default encoding is used.
|
||||
- For Windows, see [url=https://learn.microsoft.com/en-us/windows/win32/Intl/code-page-identifiers]Code Page Identifiers[/url] .NET names.
|
||||
- For macOS and Linux/BSD, see [code]libiconv[/code] library documentation and [code]iconv --list[/code] for a list of supported encodings.
|
||||
</description>
|
||||
</method>
|
||||
<method name="to_pascal_case" qualifiers="const">
|
||||
<return type="String" />
|
||||
<description>
|
||||
|
|
@ -1106,6 +1165,7 @@
|
|||
GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?highlight=Godot Engine:docs"
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
[b]Note:[/b] This method decodes [code]+[/code] as space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="uri_encode" qualifiers="const">
|
||||
|
|
@ -1128,6 +1188,12 @@
|
|||
[/codeblocks]
|
||||
</description>
|
||||
</method>
|
||||
<method name="uri_file_decode" qualifiers="const">
|
||||
<return type="String" />
|
||||
<description>
|
||||
Decodes the file path from its URL-encoded format. Unlike [method uri_decode] this method leaves [code]+[/code] as is.
|
||||
</description>
|
||||
</method>
|
||||
<method name="validate_filename" qualifiers="const">
|
||||
<return type="String" />
|
||||
<description>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue