mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current master branch (705b7a0)
This commit is contained in:
@@ -323,7 +323,7 @@ Constructor Descriptions
|
||||
|
||||
.. rst-class:: classref-constructor
|
||||
|
||||
:ref:`String<class_String>` **String**\ (\ )
|
||||
:ref:`String<class_String>` **String**\ (\ ) :ref:`🔗<class_String_constructor_String>`
|
||||
|
||||
Constructs an empty **String** (``""``).
|
||||
|
||||
@@ -370,7 +370,7 @@ Method Descriptions
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **begins_with**\ (\ text\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **begins_with**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_begins_with>`
|
||||
|
||||
Returns ``true`` if the string begins with the given ``text``. See also :ref:`ends_with<class_String_method_ends_with>`.
|
||||
|
||||
@@ -382,7 +382,7 @@ Returns ``true`` if the string begins with the given ``text``. See also :ref:`en
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedStringArray<class_PackedStringArray>` **bigrams**\ (\ ) |const|
|
||||
:ref:`PackedStringArray<class_PackedStringArray>` **bigrams**\ (\ ) |const| :ref:`🔗<class_String_method_bigrams>`
|
||||
|
||||
Returns an array containing the bigrams (pairs of consecutive characters) of this string.
|
||||
|
||||
@@ -398,7 +398,7 @@ Returns an array containing the bigrams (pairs of consecutive characters) of thi
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **bin_to_int**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **bin_to_int**\ (\ ) |const| :ref:`🔗<class_String_method_bin_to_int>`
|
||||
|
||||
Converts the string representing a binary number into an :ref:`int<class_int>`. The string may optionally be prefixed with ``"0b"``, and an additional ``-`` prefix for negative numbers.
|
||||
|
||||
@@ -427,7 +427,7 @@ Converts the string representing a binary number into an :ref:`int<class_int>`.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **c_escape**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **c_escape**\ (\ ) |const| :ref:`🔗<class_String_method_c_escape>`
|
||||
|
||||
Returns a copy of the string with special characters escaped using the C language standard.
|
||||
|
||||
@@ -439,7 +439,7 @@ Returns a copy of the string with special characters escaped using the C languag
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **c_unescape**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **c_unescape**\ (\ ) |const| :ref:`🔗<class_String_method_c_unescape>`
|
||||
|
||||
Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are ``\'``, ``\"``, ``\\``, ``\a``, ``\b``, ``\f``, ``\n``, ``\r``, ``\t``, ``\v``.
|
||||
|
||||
@@ -453,7 +453,7 @@ Returns a copy of the string with escaped characters replaced by their meanings.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **capitalize**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **capitalize**\ (\ ) |const| :ref:`🔗<class_String_method_capitalize>`
|
||||
|
||||
Changes the appearance of the string: replaces underscores (``_``) with spaces, adds spaces before uppercase letters in the middle of a word, converts all letters to lowercase, then converts the first one and each one following a space to uppercase.
|
||||
|
||||
@@ -482,7 +482,7 @@ Changes the appearance of the string: replaces underscores (``_``) with spaces,
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **casecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`int<class_int>` **casecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_casecmp_to>`
|
||||
|
||||
Performs a case-sensitive comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" and "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order.
|
||||
|
||||
@@ -498,7 +498,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==``
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **chr**\ (\ char\: :ref:`int<class_int>`\ ) |static|
|
||||
:ref:`String<class_String>` **chr**\ (\ char\: :ref:`int<class_int>`\ ) |static| :ref:`🔗<class_String_method_chr>`
|
||||
|
||||
Returns a single Unicode character from the decimal ``char``. You may use `unicodelookup.com <https://unicodelookup.com/>`__ or `unicode.org <https://www.unicode.org/charts/>`__ as points of reference.
|
||||
|
||||
@@ -515,7 +515,7 @@ Returns a single Unicode character from the decimal ``char``. You may use `unico
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **contains**\ (\ what\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **contains**\ (\ what\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_contains>`
|
||||
|
||||
Returns ``true`` if the string contains ``what``. In GDScript, this corresponds to the ``in`` operator.
|
||||
|
||||
@@ -545,7 +545,7 @@ If you need to know where ``what`` is within the string, use :ref:`find<class_St
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **containsn**\ (\ what\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **containsn**\ (\ what\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_containsn>`
|
||||
|
||||
Returns ``true`` if the string contains ``what``, **ignoring case**.
|
||||
|
||||
@@ -559,7 +559,7 @@ If you need to know where ``what`` is within the string, use :ref:`findn<class_S
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **count**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const|
|
||||
:ref:`int<class_int>` **count**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_count>`
|
||||
|
||||
Returns the number of occurrences of the substring ``what`` between ``from`` and ``to`` positions. If ``to`` is 0, the search continues until the end of the string.
|
||||
|
||||
@@ -571,7 +571,7 @@ Returns the number of occurrences of the substring ``what`` between ``from`` and
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **countn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const|
|
||||
:ref:`int<class_int>` **countn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_countn>`
|
||||
|
||||
Returns the number of occurrences of the substring ``what`` between ``from`` and ``to`` positions, **ignoring case**. If ``to`` is 0, the search continues until the end of the string.
|
||||
|
||||
@@ -583,7 +583,7 @@ Returns the number of occurrences of the substring ``what`` between ``from`` and
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **dedent**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **dedent**\ (\ ) |const| :ref:`🔗<class_String_method_dedent>`
|
||||
|
||||
Returns a copy of the string with indentation (leading tabs and spaces) removed. See also :ref:`indent<class_String_method_indent>` to add indentation.
|
||||
|
||||
@@ -595,7 +595,7 @@ Returns a copy of the string with indentation (leading tabs and spaces) removed.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **ends_with**\ (\ text\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **ends_with**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_ends_with>`
|
||||
|
||||
Returns ``true`` if the string ends with the given ``text``. See also :ref:`begins_with<class_String_method_begins_with>`.
|
||||
|
||||
@@ -607,7 +607,7 @@ Returns ``true`` if the string ends with the given ``text``. See also :ref:`begi
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **erase**\ (\ position\: :ref:`int<class_int>`, chars\: :ref:`int<class_int>` = 1\ ) |const|
|
||||
:ref:`String<class_String>` **erase**\ (\ position\: :ref:`int<class_int>`, chars\: :ref:`int<class_int>` = 1\ ) |const| :ref:`🔗<class_String_method_erase>`
|
||||
|
||||
Returns a string with ``chars`` characters erased starting from ``position``. If ``chars`` goes beyond the string's length given the specified ``position``, fewer characters will be erased from the returned string. Returns an empty string if either ``position`` or ``chars`` is negative. Returns the original string unmodified if ``chars`` is ``0``.
|
||||
|
||||
@@ -619,7 +619,7 @@ Returns a string with ``chars`` characters erased starting from ``position``. If
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **filecasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`int<class_int>` **filecasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_filecasecmp_to>`
|
||||
|
||||
Like :ref:`naturalcasecmp_to<class_String_method_naturalcasecmp_to>` but prioritizes strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names.
|
||||
|
||||
@@ -633,7 +633,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==``
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **filenocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`int<class_int>` **filenocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_filenocasecmp_to>`
|
||||
|
||||
Like :ref:`naturalnocasecmp_to<class_String_method_naturalnocasecmp_to>` but prioritizes strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names.
|
||||
|
||||
@@ -647,7 +647,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==``
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **find**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const|
|
||||
:ref:`int<class_int>` **find**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_find>`
|
||||
|
||||
Returns the index of the **first** occurrence of ``what`` in this string, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the end of the string.
|
||||
|
||||
@@ -682,7 +682,7 @@ Returns the index of the **first** occurrence of ``what`` in this string, or ``-
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **findn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const|
|
||||
:ref:`int<class_int>` **findn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_findn>`
|
||||
|
||||
Returns the index of the **first** **case-insensitive** occurrence of ``what`` in this string, or ``-1`` if there are none. The starting search index can be specified with ``from``, continuing to the end of the string.
|
||||
|
||||
@@ -694,7 +694,7 @@ Returns the index of the **first** **case-insensitive** occurrence of ``what`` i
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **format**\ (\ values\: :ref:`Variant<class_Variant>`, placeholder\: :ref:`String<class_String>` = "{_}"\ ) |const|
|
||||
:ref:`String<class_String>` **format**\ (\ values\: :ref:`Variant<class_Variant>`, placeholder\: :ref:`String<class_String>` = "{_}"\ ) |const| :ref:`🔗<class_String_method_format>`
|
||||
|
||||
Formats the string by replacing all occurrences of ``placeholder`` with the elements of ``values``.
|
||||
|
||||
@@ -738,7 +738,7 @@ See also the :doc:`GDScript format string <../tutorials/scripting/gdscript/gdscr
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **get_base_dir**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **get_base_dir**\ (\ ) |const| :ref:`🔗<class_String_method_get_base_dir>`
|
||||
|
||||
If the string is a valid file path, returns the base directory name.
|
||||
|
||||
@@ -754,7 +754,7 @@ If the string is a valid file path, returns the base directory name.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **get_basename**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **get_basename**\ (\ ) |const| :ref:`🔗<class_String_method_get_basename>`
|
||||
|
||||
If the string is a valid file path, returns the full file path, without the extension.
|
||||
|
||||
@@ -770,7 +770,7 @@ If the string is a valid file path, returns the full file path, without the exte
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **get_extension**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **get_extension**\ (\ ) |const| :ref:`🔗<class_String_method_get_extension>`
|
||||
|
||||
If the string is a valid file name or path, returns the file extension without the leading period (``.``). Otherwise, returns an empty string.
|
||||
|
||||
@@ -794,7 +794,7 @@ If the string is a valid file name or path, returns the file extension without t
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **get_file**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **get_file**\ (\ ) |const| :ref:`🔗<class_String_method_get_file>`
|
||||
|
||||
If the string is a valid file path, returns the file name, including the extension.
|
||||
|
||||
@@ -810,7 +810,7 @@ If the string is a valid file path, returns the file name, including the extensi
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **get_slice**\ (\ delimiter\: :ref:`String<class_String>`, slice\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`String<class_String>` **get_slice**\ (\ delimiter\: :ref:`String<class_String>`, slice\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_get_slice>`
|
||||
|
||||
Splits the string using a ``delimiter`` and returns the substring at index ``slice``. Returns the original string if ``delimiter`` does not occur in the string. Returns an empty string if the ``slice`` does not exist.
|
||||
|
||||
@@ -830,7 +830,7 @@ This is faster than :ref:`split<class_String_method_split>`, if you only need on
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **get_slice_count**\ (\ delimiter\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`int<class_int>` **get_slice_count**\ (\ delimiter\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_get_slice_count>`
|
||||
|
||||
Returns the total number of slices when the string is split with the given ``delimiter`` (see :ref:`split<class_String_method_split>`).
|
||||
|
||||
@@ -842,7 +842,7 @@ Returns the total number of slices when the string is split with the given ``del
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **get_slicec**\ (\ delimiter\: :ref:`int<class_int>`, slice\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`String<class_String>` **get_slicec**\ (\ delimiter\: :ref:`int<class_int>`, slice\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_get_slicec>`
|
||||
|
||||
Splits the string using a Unicode character with code ``delimiter`` and returns the substring at index ``slice``. Returns an empty string if the ``slice`` does not exist.
|
||||
|
||||
@@ -856,7 +856,7 @@ This is faster than :ref:`split<class_String_method_split>`, if you only need on
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **hash**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **hash**\ (\ ) |const| :ref:`🔗<class_String_method_hash>`
|
||||
|
||||
Returns the 32-bit hash value representing the string's contents.
|
||||
|
||||
@@ -870,7 +870,7 @@ Returns the 32-bit hash value representing the string's contents.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **hex_decode**\ (\ ) |const|
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **hex_decode**\ (\ ) |const| :ref:`🔗<class_String_method_hex_decode>`
|
||||
|
||||
Decodes a hexadecimal string as a :ref:`PackedByteArray<class_PackedByteArray>`.
|
||||
|
||||
@@ -899,7 +899,7 @@ Decodes a hexadecimal string as a :ref:`PackedByteArray<class_PackedByteArray>`.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **hex_to_int**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **hex_to_int**\ (\ ) |const| :ref:`🔗<class_String_method_hex_to_int>`
|
||||
|
||||
Converts the string representing a hexadecimal number into an :ref:`int<class_int>`. The string may be optionally prefixed with ``"0x"``, and an additional ``-`` prefix for negative numbers.
|
||||
|
||||
@@ -926,7 +926,7 @@ Converts the string representing a hexadecimal number into an :ref:`int<class_in
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **humanize_size**\ (\ size\: :ref:`int<class_int>`\ ) |static|
|
||||
:ref:`String<class_String>` **humanize_size**\ (\ size\: :ref:`int<class_int>`\ ) |static| :ref:`🔗<class_String_method_humanize_size>`
|
||||
|
||||
Converts ``size`` which represents a number of bytes into a human-readable form.
|
||||
|
||||
@@ -940,7 +940,7 @@ The result is in `IEC prefix format <https://en.wikipedia.org/wiki/Binary_prefix
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **indent**\ (\ prefix\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`String<class_String>` **indent**\ (\ prefix\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_indent>`
|
||||
|
||||
Indents every line of the string with the given ``prefix``. Empty lines are not indented. See also :ref:`dedent<class_String_method_dedent>` to remove indentation.
|
||||
|
||||
@@ -954,7 +954,7 @@ For example, the string can be indented with two tabulations using ``"\t\t"``, o
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **insert**\ (\ position\: :ref:`int<class_int>`, what\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`String<class_String>` **insert**\ (\ position\: :ref:`int<class_int>`, what\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_insert>`
|
||||
|
||||
Inserts ``what`` at the given ``position`` in the string.
|
||||
|
||||
@@ -966,7 +966,7 @@ Inserts ``what`` at the given ``position`` in the string.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_absolute_path**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_absolute_path**\ (\ ) |const| :ref:`🔗<class_String_method_is_absolute_path>`
|
||||
|
||||
Returns ``true`` if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of :ref:`is_relative_path<class_String_method_is_relative_path>`.
|
||||
|
||||
@@ -980,7 +980,7 @@ This includes all paths starting with ``"res://"``, ``"user://"``, ``"C:\"``, ``
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_empty**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_String_method_is_empty>`
|
||||
|
||||
Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length<class_String_method_length>`.
|
||||
|
||||
@@ -992,7 +992,7 @@ Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_relative_path**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_relative_path**\ (\ ) |const| :ref:`🔗<class_String_method_is_relative_path>`
|
||||
|
||||
Returns ``true`` if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current :ref:`Node<class_Node>` (if the string is derived from a :ref:`NodePath<class_NodePath>`), and may sometimes be prefixed with ``"./"``. This method is the opposite of :ref:`is_absolute_path<class_String_method_is_absolute_path>`.
|
||||
|
||||
@@ -1004,7 +1004,7 @@ Returns ``true`` if the string is a path, and its starting point is dependent on
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_subsequence_of**\ (\ text\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_subsequence_of**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_is_subsequence_of>`
|
||||
|
||||
Returns ``true`` if all characters of this string can be found in ``text`` in their original order.
|
||||
|
||||
@@ -1025,7 +1025,7 @@ Returns ``true`` if all characters of this string can be found in ``text`` in th
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_subsequence_ofn**\ (\ text\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_subsequence_ofn**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_is_subsequence_ofn>`
|
||||
|
||||
Returns ``true`` if all characters of this string can be found in ``text`` in their original order, **ignoring case**.
|
||||
|
||||
@@ -1037,7 +1037,7 @@ Returns ``true`` if all characters of this string can be found in ``text`` in th
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_valid_filename**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_valid_filename**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_filename>`
|
||||
|
||||
Returns ``true`` if this string does not contain characters that are not allowed in file names (``:`` ``/`` ``\`` ``?`` ``*`` ``"`` ``|`` ``%`` ``<`` ``>``).
|
||||
|
||||
@@ -1049,7 +1049,7 @@ Returns ``true`` if this string does not contain characters that are not allowed
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_valid_float**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_valid_float**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_float>`
|
||||
|
||||
Returns ``true`` if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point (``.``), and the exponent letter (``e``). It may also be prefixed with a positive (``+``) or negative (``-``) sign. Any valid integer is also a valid float (see :ref:`is_valid_int<class_String_method_is_valid_int>`). See also :ref:`to_float<class_String_method_to_float>`.
|
||||
|
||||
@@ -1068,7 +1068,7 @@ Returns ``true`` if this string represents a valid floating-point number. A vali
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_valid_hex_number**\ (\ with_prefix\: :ref:`bool<class_bool>` = false\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_valid_hex_number**\ (\ with_prefix\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_String_method_is_valid_hex_number>`
|
||||
|
||||
Returns ``true`` if this string is a valid hexadecimal number. A valid hexadecimal number only contains digits or letters ``A`` to ``F`` (either uppercase or lowercase), and may be prefixed with a positive (``+``) or negative (``-``) sign.
|
||||
|
||||
@@ -1090,7 +1090,7 @@ If ``with_prefix`` is ``true``, the hexadecimal number needs to prefixed by ``"0
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_valid_html_color**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_valid_html_color**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_html_color>`
|
||||
|
||||
Returns ``true`` if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see :ref:`is_valid_hex_number<class_String_method_is_valid_hex_number>`) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). Other HTML notations for colors, such as names or ``hsl()``, are not considered valid. See also :ref:`Color.html<class_Color_method_html>`.
|
||||
|
||||
@@ -1102,7 +1102,7 @@ Returns ``true`` if this string is a valid color in hexadecimal HTML notation. T
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_valid_identifier**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_valid_identifier**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_identifier>`
|
||||
|
||||
Returns ``true`` if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (``_``), and the first character may not be a digit.
|
||||
|
||||
@@ -1121,7 +1121,7 @@ Returns ``true`` if this string is a valid identifier. A valid identifier may co
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_valid_int**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_valid_int**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_int>`
|
||||
|
||||
Returns ``true`` if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive (``+``) or negative (``-``) sign. See also :ref:`to_int<class_String_method_to_int>`.
|
||||
|
||||
@@ -1141,7 +1141,7 @@ Returns ``true`` if this string represents a valid integer. A valid integer only
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_valid_ip_address**\ (\ ) |const|
|
||||
:ref:`bool<class_bool>` **is_valid_ip_address**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_ip_address>`
|
||||
|
||||
Returns ``true`` if this string represents a well-formatted IPv4 or IPv6 address. This method considers `reserved IP addresses <https://en.wikipedia.org/wiki/Reserved_IP_addresses>`__ such as ``"0.0.0.0"`` and ``"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"`` as valid.
|
||||
|
||||
@@ -1153,7 +1153,7 @@ Returns ``true`` if this string represents a well-formatted IPv4 or IPv6 address
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **join**\ (\ parts\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const|
|
||||
:ref:`String<class_String>` **join**\ (\ parts\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| :ref:`🔗<class_String_method_join>`
|
||||
|
||||
Returns the concatenation of ``parts``' elements, with each element separated by the string calling this method. This method is the opposite of :ref:`split<class_String_method_split>`.
|
||||
|
||||
@@ -1187,7 +1187,7 @@ Returns the concatenation of ``parts``' elements, with each element separated by
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **json_escape**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **json_escape**\ (\ ) |const| :ref:`🔗<class_String_method_json_escape>`
|
||||
|
||||
Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use :ref:`c_unescape<class_String_method_c_unescape>` to unescape the string, if necessary.
|
||||
|
||||
@@ -1199,7 +1199,7 @@ Returns a copy of the string with special characters escaped using the JSON stan
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **left**\ (\ length\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`String<class_String>` **left**\ (\ length\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_left>`
|
||||
|
||||
Returns the first ``length`` characters from the beginning of the string. If ``length`` is negative, strips the last ``length`` characters from the string's end.
|
||||
|
||||
@@ -1216,7 +1216,7 @@ Returns the first ``length`` characters from the beginning of the string. If ``l
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **length**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **length**\ (\ ) |const| :ref:`🔗<class_String_method_length>`
|
||||
|
||||
Returns the number of characters in the string. Empty strings (``""``) always return ``0``. See also :ref:`is_empty<class_String_method_is_empty>`.
|
||||
|
||||
@@ -1228,7 +1228,7 @@ Returns the number of characters in the string. Empty strings (``""``) always re
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **lpad**\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const|
|
||||
:ref:`String<class_String>` **lpad**\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const| :ref:`🔗<class_String_method_lpad>`
|
||||
|
||||
Formats the string to be at least ``min_length`` long by adding ``character``\ s to the left of the string, if necessary. See also :ref:`rpad<class_String_method_rpad>`.
|
||||
|
||||
@@ -1240,7 +1240,7 @@ Formats the string to be at least ``min_length`` long by adding ``character``\ s
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **lstrip**\ (\ chars\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`String<class_String>` **lstrip**\ (\ chars\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_lstrip>`
|
||||
|
||||
Removes a set of characters defined in ``chars`` from the string's beginning. See also :ref:`rstrip<class_String_method_rstrip>`.
|
||||
|
||||
@@ -1254,7 +1254,7 @@ Removes a set of characters defined in ``chars`` from the string's beginning. Se
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **match**\ (\ expr\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **match**\ (\ expr\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_match>`
|
||||
|
||||
Does a simple expression match (also called "glob" or "globbing"), where ``*`` matches zero or more arbitrary characters and ``?`` matches any single character except a period (``.``). An empty string or empty expression always evaluates to ``false``.
|
||||
|
||||
@@ -1266,7 +1266,7 @@ Does a simple expression match (also called "glob" or "globbing"), where ``*`` m
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **matchn**\ (\ expr\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`bool<class_bool>` **matchn**\ (\ expr\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_matchn>`
|
||||
|
||||
Does a simple **case-insensitive** expression match, where ``*`` matches zero or more arbitrary characters and ``?`` matches any single character except a period (``.``). An empty string or empty expression always evaluates to ``false``.
|
||||
|
||||
@@ -1278,7 +1278,7 @@ Does a simple **case-insensitive** expression match, where ``*`` matches zero or
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **md5_buffer**\ (\ ) |const|
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **md5_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_md5_buffer>`
|
||||
|
||||
Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as a :ref:`PackedByteArray<class_PackedByteArray>`.
|
||||
|
||||
@@ -1290,7 +1290,7 @@ Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as a
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **md5_text**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **md5_text**\ (\ ) |const| :ref:`🔗<class_String_method_md5_text>`
|
||||
|
||||
Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as another **String**.
|
||||
|
||||
@@ -1302,7 +1302,7 @@ Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as an
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **naturalcasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`int<class_int>` **naturalcasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_naturalcasecmp_to>`
|
||||
|
||||
Performs a **case-sensitive**, *natural order* comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order.
|
||||
|
||||
@@ -1320,7 +1320,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==``
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **naturalnocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`int<class_int>` **naturalnocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_naturalnocasecmp_to>`
|
||||
|
||||
Performs a **case-insensitive**, *natural order* comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison.
|
||||
|
||||
@@ -1338,7 +1338,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==``
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **nocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`int<class_int>` **nocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_nocasecmp_to>`
|
||||
|
||||
Performs a **case-insensitive** comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison.
|
||||
|
||||
@@ -1354,7 +1354,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==``
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **num**\ (\ number\: :ref:`float<class_float>`, decimals\: :ref:`int<class_int>` = -1\ ) |static|
|
||||
:ref:`String<class_String>` **num**\ (\ number\: :ref:`float<class_float>`, decimals\: :ref:`int<class_int>` = -1\ ) |static| :ref:`🔗<class_String_method_num>`
|
||||
|
||||
Converts a :ref:`float<class_float>` to a string representation of a decimal number, with the number of decimal places specified in ``decimals``.
|
||||
|
||||
@@ -1386,7 +1386,7 @@ Trailing zeros are not included in the string. The last digit is rounded, not tr
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **num_int64**\ (\ number\: :ref:`int<class_int>`, base\: :ref:`int<class_int>` = 10, capitalize_hex\: :ref:`bool<class_bool>` = false\ ) |static|
|
||||
:ref:`String<class_String>` **num_int64**\ (\ number\: :ref:`int<class_int>`, base\: :ref:`int<class_int>` = 10, capitalize_hex\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_String_method_num_int64>`
|
||||
|
||||
Converts the given ``number`` to a string representation, with the given ``base``.
|
||||
|
||||
@@ -1402,7 +1402,7 @@ If ``capitalize_hex`` is ``true``, digits higher than 9 are represented in upper
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **num_scientific**\ (\ number\: :ref:`float<class_float>`\ ) |static|
|
||||
:ref:`String<class_String>` **num_scientific**\ (\ number\: :ref:`float<class_float>`\ ) |static| :ref:`🔗<class_String_method_num_scientific>`
|
||||
|
||||
Converts the given ``number`` to a string representation, in scientific notation.
|
||||
|
||||
@@ -1435,7 +1435,7 @@ Converts the given ``number`` to a string representation, in scientific notation
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **num_uint64**\ (\ number\: :ref:`int<class_int>`, base\: :ref:`int<class_int>` = 10, capitalize_hex\: :ref:`bool<class_bool>` = false\ ) |static|
|
||||
:ref:`String<class_String>` **num_uint64**\ (\ number\: :ref:`int<class_int>`, base\: :ref:`int<class_int>` = 10, capitalize_hex\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_String_method_num_uint64>`
|
||||
|
||||
Converts the given unsigned :ref:`int<class_int>` to a string representation, with the given ``base``.
|
||||
|
||||
@@ -1451,7 +1451,7 @@ If ``capitalize_hex`` is ``true``, digits higher than 9 are represented in upper
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **pad_decimals**\ (\ digits\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`String<class_String>` **pad_decimals**\ (\ digits\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_pad_decimals>`
|
||||
|
||||
Formats the string representing a number to have an exact number of ``digits`` *after* the decimal point.
|
||||
|
||||
@@ -1463,7 +1463,7 @@ Formats the string representing a number to have an exact number of ``digits`` *
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **pad_zeros**\ (\ digits\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`String<class_String>` **pad_zeros**\ (\ digits\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_pad_zeros>`
|
||||
|
||||
Formats the string representing a number to have an exact number of ``digits`` *before* the decimal point.
|
||||
|
||||
@@ -1475,7 +1475,7 @@ Formats the string representing a number to have an exact number of ``digits`` *
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **path_join**\ (\ file\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`String<class_String>` **path_join**\ (\ file\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_path_join>`
|
||||
|
||||
Concatenates ``file`` at the end of the string as a subpath, adding ``/`` if necessary.
|
||||
|
||||
@@ -1489,7 +1489,7 @@ Concatenates ``file`` at the end of the string as a subpath, adding ``/`` if nec
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **repeat**\ (\ count\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`String<class_String>` **repeat**\ (\ count\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_repeat>`
|
||||
|
||||
Repeats this string a number of times. ``count`` needs to be greater than ``0``. Otherwise, returns an empty string.
|
||||
|
||||
@@ -1501,7 +1501,7 @@ Repeats this string a number of times. ``count`` needs to be greater than ``0``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **replace**\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`String<class_String>` **replace**\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_replace>`
|
||||
|
||||
Replaces all occurrences of ``what`` inside the string with the given ``forwhat``.
|
||||
|
||||
@@ -1513,7 +1513,7 @@ Replaces all occurrences of ``what`` inside the string with the given ``forwhat`
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **replacen**\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`String<class_String>` **replacen**\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_replacen>`
|
||||
|
||||
Replaces all **case-insensitive** occurrences of ``what`` inside the string with the given ``forwhat``.
|
||||
|
||||
@@ -1525,7 +1525,7 @@ Replaces all **case-insensitive** occurrences of ``what`` inside the string with
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **reverse**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **reverse**\ (\ ) |const| :ref:`🔗<class_String_method_reverse>`
|
||||
|
||||
Returns the copy of this string in reverse order. This operation works on unicode codepoints, rather than sequences of codepoints, and may break things like compound letters or emojis.
|
||||
|
||||
@@ -1537,7 +1537,7 @@ Returns the copy of this string in reverse order. This operation works on unicod
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **rfind**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const|
|
||||
:ref:`int<class_int>` **rfind**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_String_method_rfind>`
|
||||
|
||||
Returns the index of the **last** occurrence of ``what`` in this string, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`find<class_String_method_find>`.
|
||||
|
||||
@@ -1549,7 +1549,7 @@ Returns the index of the **last** occurrence of ``what`` in this string, or ``-1
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **rfindn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const|
|
||||
:ref:`int<class_int>` **rfindn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_String_method_rfindn>`
|
||||
|
||||
Returns the index of the **last** **case-insensitive** occurrence of ``what`` in this string, or ``-1`` if there are none. The starting search index can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`findn<class_String_method_findn>`.
|
||||
|
||||
@@ -1561,7 +1561,7 @@ Returns the index of the **last** **case-insensitive** occurrence of ``what`` in
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **right**\ (\ length\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`String<class_String>` **right**\ (\ length\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_right>`
|
||||
|
||||
Returns the last ``length`` characters from the end of the string. If ``length`` is negative, strips the first ``length`` characters from the string's beginning.
|
||||
|
||||
@@ -1578,7 +1578,7 @@ Returns the last ``length`` characters from the end of the string. If ``length``
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **rpad**\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const|
|
||||
:ref:`String<class_String>` **rpad**\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const| :ref:`🔗<class_String_method_rpad>`
|
||||
|
||||
Formats the string to be at least ``min_length`` long, by adding ``character``\ s to the right of the string, if necessary. See also :ref:`lpad<class_String_method_lpad>`.
|
||||
|
||||
@@ -1590,7 +1590,7 @@ Formats the string to be at least ``min_length`` long, by adding ``character``\
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedStringArray<class_PackedStringArray>` **rsplit**\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const|
|
||||
:ref:`PackedStringArray<class_PackedStringArray>` **rsplit**\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_rsplit>`
|
||||
|
||||
Splits the string using a ``delimiter`` and returns an array of the substrings, starting from the end of the string. The splits in the returned array appear in the same order as the original string. If ``delimiter`` is an empty string, each substring will be a single character.
|
||||
|
||||
@@ -1626,7 +1626,7 @@ If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``max
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **rstrip**\ (\ chars\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`String<class_String>` **rstrip**\ (\ chars\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_rstrip>`
|
||||
|
||||
Removes a set of characters defined in ``chars`` from the string's end. See also :ref:`lstrip<class_String_method_lstrip>`.
|
||||
|
||||
@@ -1640,7 +1640,7 @@ Removes a set of characters defined in ``chars`` from the string's end. See also
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **sha1_buffer**\ (\ ) |const|
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **sha1_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_sha1_buffer>`
|
||||
|
||||
Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string as a :ref:`PackedByteArray<class_PackedByteArray>`.
|
||||
|
||||
@@ -1652,7 +1652,7 @@ Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string a
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **sha1_text**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **sha1_text**\ (\ ) |const| :ref:`🔗<class_String_method_sha1_text>`
|
||||
|
||||
Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string as another **String**.
|
||||
|
||||
@@ -1664,7 +1664,7 @@ Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string a
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **sha256_buffer**\ (\ ) |const|
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **sha256_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_sha256_buffer>`
|
||||
|
||||
Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string as a :ref:`PackedByteArray<class_PackedByteArray>`.
|
||||
|
||||
@@ -1676,7 +1676,7 @@ Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **sha256_text**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **sha256_text**\ (\ ) |const| :ref:`🔗<class_String_method_sha256_text>`
|
||||
|
||||
Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string as another **String**.
|
||||
|
||||
@@ -1688,7 +1688,7 @@ Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **similarity**\ (\ text\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`float<class_float>` **similarity**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_similarity>`
|
||||
|
||||
Returns the similarity index (`Sorensen-Dice coefficient <https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient>`__) of this string compared to another. A result of ``1.0`` means totally similar, while ``0.0`` means totally dissimilar.
|
||||
|
||||
@@ -1707,7 +1707,7 @@ Returns the similarity index (`Sorensen-Dice coefficient <https://en.wikipedia.o
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **simplify_path**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **simplify_path**\ (\ ) |const| :ref:`🔗<class_String_method_simplify_path>`
|
||||
|
||||
If the string is a valid file path, converts the string into a canonical path. This is the shortest possible path, without ``"./"``, and all the unnecessary ``".."`` and ``"/"``.
|
||||
|
||||
@@ -1724,7 +1724,7 @@ If the string is a valid file path, converts the string into a canonical path. T
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedStringArray<class_PackedStringArray>` **split**\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const|
|
||||
:ref:`PackedStringArray<class_PackedStringArray>` **split**\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_split>`
|
||||
|
||||
Splits the string using a ``delimiter`` and returns an array of the substrings. If ``delimiter`` is an empty string, each substring will be a single character. This method is the opposite of :ref:`join<class_String_method_join>`.
|
||||
|
||||
@@ -1767,7 +1767,7 @@ If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``max
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedFloat64Array<class_PackedFloat64Array>` **split_floats**\ (\ delimiter\: :ref:`String<class_String>`, allow_empty\: :ref:`bool<class_bool>` = true\ ) |const|
|
||||
:ref:`PackedFloat64Array<class_PackedFloat64Array>` **split_floats**\ (\ delimiter\: :ref:`String<class_String>`, allow_empty\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_String_method_split_floats>`
|
||||
|
||||
Splits the string into floats by using a ``delimiter`` and returns a :ref:`PackedFloat64Array<class_PackedFloat64Array>`.
|
||||
|
||||
@@ -1787,7 +1787,7 @@ If ``allow_empty`` is ``false``, empty or invalid :ref:`float<class_float>` conv
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **strip_edges**\ (\ left\: :ref:`bool<class_bool>` = true, right\: :ref:`bool<class_bool>` = true\ ) |const|
|
||||
:ref:`String<class_String>` **strip_edges**\ (\ left\: :ref:`bool<class_bool>` = true, right\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_String_method_strip_edges>`
|
||||
|
||||
Strips all non-printable characters from the beginning and the end of the string. These include spaces, tabulations (``\t``), and newlines (``\n`` ``\r``).
|
||||
|
||||
@@ -1801,7 +1801,7 @@ If ``left`` is ``false``, ignores the string's beginning. Likewise, if ``right``
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **strip_escapes**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **strip_escapes**\ (\ ) |const| :ref:`🔗<class_String_method_strip_escapes>`
|
||||
|
||||
Strips all escape characters from the string. These include all non-printable control characters of the first page of the ASCII table (values from 0 to 31), such as tabulation (``\t``) and newline (``\n``, ``\r``) characters, but *not* spaces.
|
||||
|
||||
@@ -1813,7 +1813,7 @@ Strips all escape characters from the string. These include all non-printable co
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **substr**\ (\ from\: :ref:`int<class_int>`, len\: :ref:`int<class_int>` = -1\ ) |const|
|
||||
:ref:`String<class_String>` **substr**\ (\ from\: :ref:`int<class_int>`, len\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_String_method_substr>`
|
||||
|
||||
Returns part of the string from the position ``from`` with length ``len``. If ``len`` is ``-1`` (as by default), returns the rest of the string starting from the given position.
|
||||
|
||||
@@ -1825,7 +1825,7 @@ Returns part of the string from the position ``from`` with length ``len``. If ``
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **to_ascii_buffer**\ (\ ) |const|
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **to_ascii_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_to_ascii_buffer>`
|
||||
|
||||
Converts the string to an `ASCII <https://en.wikipedia.org/wiki/ASCII>`__/Latin-1 encoded :ref:`PackedByteArray<class_PackedByteArray>`. This method is slightly faster than :ref:`to_utf8_buffer<class_String_method_to_utf8_buffer>`, but replaces all unsupported characters with spaces. This is the inverse of :ref:`PackedByteArray.get_string_from_ascii<class_PackedByteArray_method_get_string_from_ascii>`.
|
||||
|
||||
@@ -1837,7 +1837,7 @@ Converts the string to an `ASCII <https://en.wikipedia.org/wiki/ASCII>`__/Latin-
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **to_camel_case**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **to_camel_case**\ (\ ) |const| :ref:`🔗<class_String_method_to_camel_case>`
|
||||
|
||||
Returns the string converted to ``camelCase``.
|
||||
|
||||
@@ -1849,7 +1849,7 @@ Returns the string converted to ``camelCase``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **to_float**\ (\ ) |const|
|
||||
:ref:`float<class_float>` **to_float**\ (\ ) |const| :ref:`🔗<class_String_method_to_float>`
|
||||
|
||||
Converts the string representing a decimal number into a :ref:`float<class_float>`. This method stops on the first non-number character, except the first decimal point (``.``) and the exponent letter (``e``). See also :ref:`is_valid_float<class_String_method_is_valid_float>`.
|
||||
|
||||
@@ -1869,7 +1869,7 @@ Converts the string representing a decimal number into a :ref:`float<class_float
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **to_int**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **to_int**\ (\ ) |const| :ref:`🔗<class_String_method_to_int>`
|
||||
|
||||
Converts the string representing an integer number into an :ref:`int<class_int>`. This method removes any non-number character and stops at the first decimal point (``.``). See also :ref:`is_valid_int<class_String_method_is_valid_int>`.
|
||||
|
||||
@@ -1888,7 +1888,7 @@ Converts the string representing an integer number into an :ref:`int<class_int>`
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **to_lower**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **to_lower**\ (\ ) |const| :ref:`🔗<class_String_method_to_lower>`
|
||||
|
||||
Returns the string converted to ``lowercase``.
|
||||
|
||||
@@ -1900,7 +1900,7 @@ Returns the string converted to ``lowercase``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **to_pascal_case**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **to_pascal_case**\ (\ ) |const| :ref:`🔗<class_String_method_to_pascal_case>`
|
||||
|
||||
Returns the string converted to ``PascalCase``.
|
||||
|
||||
@@ -1912,7 +1912,7 @@ Returns the string converted to ``PascalCase``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **to_snake_case**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **to_snake_case**\ (\ ) |const| :ref:`🔗<class_String_method_to_snake_case>`
|
||||
|
||||
Returns the string converted to ``snake_case``.
|
||||
|
||||
@@ -1943,7 +1943,7 @@ Returns the string converted to ``snake_case``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **to_upper**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **to_upper**\ (\ ) |const| :ref:`🔗<class_String_method_to_upper>`
|
||||
|
||||
Returns the string converted to ``UPPERCASE``.
|
||||
|
||||
@@ -1955,7 +1955,7 @@ Returns the string converted to ``UPPERCASE``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **to_utf8_buffer**\ (\ ) |const|
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **to_utf8_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_to_utf8_buffer>`
|
||||
|
||||
Converts the string to a `UTF-8 <https://en.wikipedia.org/wiki/UTF-8>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. This method is slightly slower than :ref:`to_ascii_buffer<class_String_method_to_ascii_buffer>`, but supports all UTF-8 characters. For most cases, prefer using this method. This is the inverse of :ref:`PackedByteArray.get_string_from_utf8<class_PackedByteArray_method_get_string_from_utf8>`.
|
||||
|
||||
@@ -1967,7 +1967,7 @@ Converts the string to a `UTF-8 <https://en.wikipedia.org/wiki/UTF-8>`__ encoded
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **to_utf16_buffer**\ (\ ) |const|
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **to_utf16_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_to_utf16_buffer>`
|
||||
|
||||
Converts the string to a `UTF-16 <https://en.wikipedia.org/wiki/UTF-16>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf16<class_PackedByteArray_method_get_string_from_utf16>`.
|
||||
|
||||
@@ -1979,7 +1979,7 @@ Converts the string to a `UTF-16 <https://en.wikipedia.org/wiki/UTF-16>`__ encod
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **to_utf32_buffer**\ (\ ) |const|
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **to_utf32_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_to_utf32_buffer>`
|
||||
|
||||
Converts the string to a `UTF-32 <https://en.wikipedia.org/wiki/UTF-32>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf32<class_PackedByteArray_method_get_string_from_utf32>`.
|
||||
|
||||
@@ -1991,7 +1991,7 @@ Converts the string to a `UTF-32 <https://en.wikipedia.org/wiki/UTF-32>`__ encod
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **to_wchar_buffer**\ (\ ) |const|
|
||||
:ref:`PackedByteArray<class_PackedByteArray>` **to_wchar_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_to_wchar_buffer>`
|
||||
|
||||
Converts the string to a `wide character <https://en.wikipedia.org/wiki/Wide_character>`__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray<class_PackedByteArray>`. This is the inverse of :ref:`PackedByteArray.get_string_from_wchar<class_PackedByteArray_method_get_string_from_wchar>`.
|
||||
|
||||
@@ -2003,7 +2003,7 @@ Converts the string to a `wide character <https://en.wikipedia.org/wiki/Wide_cha
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **trim_prefix**\ (\ prefix\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`String<class_String>` **trim_prefix**\ (\ prefix\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_trim_prefix>`
|
||||
|
||||
Removes the given ``prefix`` from the start of the string, or returns the string unchanged.
|
||||
|
||||
@@ -2015,7 +2015,7 @@ Removes the given ``prefix`` from the start of the string, or returns the string
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **trim_suffix**\ (\ suffix\: :ref:`String<class_String>`\ ) |const|
|
||||
:ref:`String<class_String>` **trim_suffix**\ (\ suffix\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_trim_suffix>`
|
||||
|
||||
Removes the given ``suffix`` from the end of the string, or returns the string unchanged.
|
||||
|
||||
@@ -2027,7 +2027,7 @@ Removes the given ``suffix`` from the end of the string, or returns the string u
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **unicode_at**\ (\ at\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`int<class_int>` **unicode_at**\ (\ at\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_unicode_at>`
|
||||
|
||||
Returns the character code at position ``at``.
|
||||
|
||||
@@ -2039,7 +2039,7 @@ Returns the character code at position ``at``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **uri_decode**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **uri_decode**\ (\ ) |const| :ref:`🔗<class_String_method_uri_decode>`
|
||||
|
||||
Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also :ref:`uri_encode<class_String_method_uri_encode>`.
|
||||
|
||||
@@ -2066,7 +2066,7 @@ Decodes the string from its URL-encoded format. This method is meant to properly
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **uri_encode**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **uri_encode**\ (\ ) |const| :ref:`🔗<class_String_method_uri_encode>`
|
||||
|
||||
Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also :ref:`uri_decode<class_String_method_uri_decode>`.
|
||||
|
||||
@@ -2097,7 +2097,7 @@ Encodes the string to URL-friendly format. This method is meant to properly enco
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **validate_filename**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **validate_filename**\ (\ ) |const| :ref:`🔗<class_String_method_validate_filename>`
|
||||
|
||||
Returns a copy of the string with all characters that are not allowed in :ref:`is_valid_filename<class_String_method_is_valid_filename>` replaced with underscores.
|
||||
|
||||
@@ -2109,7 +2109,7 @@ Returns a copy of the string with all characters that are not allowed in :ref:`i
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **validate_node_name**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **validate_node_name**\ (\ ) |const| :ref:`🔗<class_String_method_validate_node_name>`
|
||||
|
||||
Returns a copy of the string with all characters that are not allowed in :ref:`Node.name<class_Node_property_name>` (``.`` ``:`` ``@`` ``/`` ``"`` ``%``) replaced with underscores.
|
||||
|
||||
@@ -2121,7 +2121,7 @@ Returns a copy of the string with all characters that are not allowed in :ref:`N
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **xml_escape**\ (\ escape_quotes\: :ref:`bool<class_bool>` = false\ ) |const|
|
||||
:ref:`String<class_String>` **xml_escape**\ (\ escape_quotes\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_String_method_xml_escape>`
|
||||
|
||||
Returns a copy of the string with special characters escaped using the XML standard. If ``escape_quotes`` is ``true``, the single quote (``'``) and double quote (``"``) characters are also escaped.
|
||||
|
||||
@@ -2133,7 +2133,7 @@ Returns a copy of the string with special characters escaped using the XML stand
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **xml_unescape**\ (\ ) |const|
|
||||
:ref:`String<class_String>` **xml_unescape**\ (\ ) |const| :ref:`🔗<class_String_method_xml_unescape>`
|
||||
|
||||
Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard.
|
||||
|
||||
@@ -2150,7 +2150,7 @@ Operator Descriptions
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`String<class_String>`\ )
|
||||
:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_neq_String>`
|
||||
|
||||
Returns ``true`` if both strings do not contain the same sequence of characters.
|
||||
|
||||
@@ -2162,7 +2162,7 @@ Returns ``true`` if both strings do not contain the same sequence of characters.
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`StringName<class_StringName>`\ )
|
||||
:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_String_operator_neq_StringName>`
|
||||
|
||||
Returns ``true`` if this **String** is not equivalent to the given :ref:`StringName<class_StringName>`.
|
||||
|
||||
@@ -2174,7 +2174,7 @@ Returns ``true`` if this **String** is not equivalent to the given :ref:`StringN
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`String<class_String>` **operator %**\ (\ right\: :ref:`Variant<class_Variant>`\ )
|
||||
:ref:`String<class_String>` **operator %**\ (\ right\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_String_operator_mod_Variant>`
|
||||
|
||||
Formats the **String**, replacing the placeholders with one or more parameters. To pass multiple parameters, ``right`` needs to be an :ref:`Array<class_Array>`.
|
||||
|
||||
@@ -2199,7 +2199,7 @@ For more information, see the :doc:`GDScript format strings <../tutorials/script
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`String<class_String>` **operator +**\ (\ right\: :ref:`String<class_String>`\ )
|
||||
:ref:`String<class_String>` **operator +**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_sum_String>`
|
||||
|
||||
Appends ``right`` at the end of this **String**, also known as a string concatenation.
|
||||
|
||||
@@ -2211,7 +2211,7 @@ Appends ``right`` at the end of this **String**, also known as a string concaten
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`String<class_String>` **operator +**\ (\ right\: :ref:`StringName<class_StringName>`\ )
|
||||
:ref:`String<class_String>` **operator +**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_String_operator_sum_StringName>`
|
||||
|
||||
Appends ``right`` at the end of this **String**, returning a **String**. This is also known as a string concatenation.
|
||||
|
||||
@@ -2223,7 +2223,7 @@ Appends ``right`` at the end of this **String**, returning a **String**. This is
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`String<class_String>`\ )
|
||||
:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_lt_String>`
|
||||
|
||||
Returns ``true`` if the left **String** comes before ``right`` in `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__, which roughly matches the alphabetical order. Useful for sorting.
|
||||
|
||||
@@ -2235,7 +2235,7 @@ Returns ``true`` if the left **String** comes before ``right`` in `Unicode order
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`String<class_String>`\ )
|
||||
:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_lte_String>`
|
||||
|
||||
Returns ``true`` if the left **String** comes before ``right`` in `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__, which roughly matches the alphabetical order, or if both are equal.
|
||||
|
||||
@@ -2247,7 +2247,7 @@ Returns ``true`` if the left **String** comes before ``right`` in `Unicode order
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`String<class_String>`\ )
|
||||
:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_eq_String>`
|
||||
|
||||
Returns ``true`` if both strings contain the same sequence of characters.
|
||||
|
||||
@@ -2259,7 +2259,7 @@ Returns ``true`` if both strings contain the same sequence of characters.
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`StringName<class_StringName>`\ )
|
||||
:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_String_operator_eq_StringName>`
|
||||
|
||||
Returns ``true`` if this **String** is equivalent to the given :ref:`StringName<class_StringName>`.
|
||||
|
||||
@@ -2271,7 +2271,7 @@ Returns ``true`` if this **String** is equivalent to the given :ref:`StringName<
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`String<class_String>`\ )
|
||||
:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_gt_String>`
|
||||
|
||||
Returns ``true`` if the left **String** comes after ``right`` in `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__, which roughly matches the alphabetical order. Useful for sorting.
|
||||
|
||||
@@ -2283,7 +2283,7 @@ Returns ``true`` if the left **String** comes after ``right`` in `Unicode order
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`String<class_String>`\ )
|
||||
:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_gte_String>`
|
||||
|
||||
Returns ``true`` if the left **String** comes after ``right`` in `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__, which roughly matches the alphabetical order, or if both are equal.
|
||||
|
||||
@@ -2295,7 +2295,7 @@ Returns ``true`` if the left **String** comes after ``right`` in `Unicode order
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`String<class_String>` **operator []**\ (\ index\: :ref:`int<class_int>`\ )
|
||||
:ref:`String<class_String>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_String_operator_idx_int>`
|
||||
|
||||
Returns a new **String** that only contains the character at ``index``. Indices start from ``0``. If ``index`` is greater or equal to ``0``, the character is fetched starting from the beginning of the string. If ``index`` is a negative value, it is fetched starting from the end. Accessing a string out-of-bounds will cause a run-time error, pausing the project execution if run from the editor.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user