diff options
author | Tim Yuen <timothy.yuen22@gmail.com> | 2023-05-18 23:05:41 -0400 |
---|---|---|
committer | Max Hilbrunner <m.hilbrunner@gmail.com> | 2023-05-30 11:33:17 +0200 |
commit | 18fa7cf967ff25701c914fa1add5cf486601d501 (patch) | |
tree | 5c68a610334743733502b73f76e9366b7f8512db /doc | |
parent | 8f25cc2d133a17480c95dec026deb9338d2da74c (diff) | |
download | redot-engine-18fa7cf967ff25701c914fa1add5cf486601d501.tar.gz |
Mention that the not operator cannot be used with Strings and StringNames
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/String.xml | 2 | ||||
-rw-r--r-- | doc/classes/StringName.xml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/String.xml b/doc/classes/String.xml index cc78f46b08..ac571e20bb 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -6,7 +6,7 @@ <description> This is the built-in string Variant type (and the one used by GDScript). Strings may contain any number of Unicode characters, and expose methods useful for manipulating and generating strings. Strings are reference-counted and use a copy-on-write approach (every modification to a string returns a new [String]), so passing them around is cheap in resources. Some string methods have corresponding variations. Variations suffixed with [code]n[/code] ([method countn], [method findn], [method replacen], etc.) are [b]case-insensitive[/b] (they make no distinction between uppercase and lowercase letters). Method variations prefixed with [code]r[/code] ([method rfind], [method rsplit], etc.) are reversed, and start from the end of the string, instead of the beginning. - [b]Note:[/b] In a boolean context, a string will evaluate to [code]false[/code] if it is empty ([code]""[/code]). Otherwise, a string will always evaluate to [code]true[/code]. + [b]Note:[/b] In a boolean context, a string will evaluate to [code]false[/code] if it is empty ([code]""[/code]). Otherwise, a string will always evaluate to [code]true[/code]. The [code]not[/code] operator cannot be used. Instead, [method is_empty] should be used to check for empty strings. </description> <tutorials> <link title="GDScript format strings">$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html</link> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index a8b9ee5f3d..557f94b84a 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -8,7 +8,7 @@ You will usually just pass a [String] to methods expecting a [StringName] and it will be automatically converted, but you may occasionally want to construct a [StringName] ahead of time with the [StringName] constructor or, in GDScript, the literal syntax [code]&"example"[/code]. See also [NodePath], which is a similar concept specifically designed to store pre-parsed scene tree paths. All of [String]'s methods are available in this class too. They convert the [StringName] into a string, and they also return a string. This is highly inefficient and should only be used if the string is desired. - [b]Note:[/b] In a boolean context, a [StringName] will evaluate to [code]false[/code] if it is empty ([code]StringName("")[/code]). Otherwise, a [StringName] will always evaluate to [code]true[/code]. + [b]Note:[/b] In a boolean context, a [StringName] will evaluate to [code]false[/code] if it is empty ([code]StringName("")[/code]). Otherwise, a [StringName] will always evaluate to [code]true[/code]. The [code]not[/code] operator cannot be used. Instead, [method is_empty] should be used to check for empty [StringName]s. </description> <tutorials> </tutorials> |